Index: /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/AbstractUsabilityEvaluationTC.java
===================================================================
--- /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/AbstractUsabilityEvaluationTC.java	(revision 560)
+++ /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/AbstractUsabilityEvaluationTC.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: AbstractUsabilityEvaluationTC.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 18.07.2012 $
@@ -5,5 +4,6 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
@@ -21,16 +21,15 @@
 import de.ugoe.cs.quest.tasktrees.testutils.DummyTextField;
 import de.ugoe.cs.quest.tasktrees.testutils.SimpleLogFormatter;
-import de.ugoe.cs.quest.tasktrees.treeifc.Iteration;
-import de.ugoe.cs.quest.tasktrees.treeifc.Selection;
-import de.ugoe.cs.quest.tasktrees.treeifc.Sequence;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTree;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeBuilder;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNodeFactory;
-import de.ugoe.cs.quest.tasktrees.treeifc.TextInputInteractionTask;
-import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeBuilderImpl;
-import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeNodeFactoryImpl;
-
-//-------------------------------------------------------------------------------------------------
+import de.ugoe.cs.quest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.quest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.quest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeBuilder;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNodeFactory;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITextInputEventTask;
+import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeBuilder;
+import de.ugoe.cs.quest.tasktrees.treeimpl.TaskTreeNodeFactory;
+
 /**
  * TODO comment
@@ -39,225 +38,179 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class AbstractUsabilityEvaluationTC
-{
-  
-  /** */
-  private TaskTreeBuilder mTaskTreeBuilder = new TaskTreeBuilderImpl();
-
-  /** */
-  private TaskTreeNodeFactory mTaskTreeNodeFactory = new TaskTreeNodeFactoryImpl();
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
+public class AbstractUsabilityEvaluationTC {
+
+    /** */
+    private ITaskTreeBuilder taskTreeBuilder = new TaskTreeBuilder();
+
+    /** */
+    private ITaskTreeNodeFactory taskTreeNodeFactory = new TaskTreeNodeFactory();
+
+    /**
    *
    */
-  //-----------------------------------------------------------------------------------------------
-  @Before
-  public void setUp()
-  {
-    Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
+    @Before
+    public void setUp() {
+        Logger.getLogger("").getHandlers()[0].setFormatter(new SimpleLogFormatter());
+    }
+
+    /**
    *
    */
-  //-----------------------------------------------------------------------------------------------
-  protected TaskTree createTaskTree(String spec)
-  {
-    Matcher matcher =
-      Pattern.compile("(\\s*(\\w+)\\s*(\\(((\\w*\\s*)*)\\))?\\s*(\\{))|(\\})").matcher(spec);
-      
-    if (!matcher.find())
+    protected ITaskTree createTaskTree(String spec) {
+        Matcher matcher =
+            Pattern.compile("(\\s*(\\w+)\\s*(\\(((\\w*\\s*)*)\\))?\\s*(\\{))|(\\})").matcher(spec);
+
+        if (!matcher.find()) {
+            if (!matcher.hitEnd()) {
+                throw new IllegalArgumentException("could not parse task specification");
+            }
+        }
+
+        return taskTreeNodeFactory.createTaskTree(parseTask(matcher, new int[1]));
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param expectedDefects
+     * @param evaluateUsability
+     */
+    protected void assertUsabilityEvaluationResult(UsabilityDefect[]         expectedDefects,
+                                                   UsabilityEvaluationResult evaluationResult)
     {
-      if (!matcher.hitEnd())
-      {
-        throw new IllegalArgumentException("could not parse task specification");
-      }
-    }
-
-    return mTaskTreeNodeFactory.createTaskTree(parseTask(matcher, new int[1]));
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param expectedDefects
-   * @param evaluateUsability
-   */
-  //-----------------------------------------------------------------------------------------------
-  protected void assertUsabilityEvaluationResult(UsabilityDefect[]         expectedDefects,
-                                                 UsabilityEvaluationResult evaluationResult)
-  {
-    assertEquals(expectedDefects.length, evaluationResult.getAllDefects().size());
-    
-    EXPECTED_DEFECT_ITERATION:
-    for (UsabilityDefect expectedDefect : expectedDefects)
-    {
-      for (UsabilityDefect defect : evaluationResult.getAllDefects())
-      {
-        if (expectedDefect.equals(defect))
-        {
-          System.err.println(defect.getParameterizedDescription());
-          continue EXPECTED_DEFECT_ITERATION;
-        }
-      }
-      
-      for (UsabilityDefect defect : evaluationResult.getAllDefects())
-      {
-        System.err.println(defect);
-      }
-      
-      fail("expected defect " + expectedDefect + " not found in evaluation result");
-    }
-  }
-
-
-  //-----------------------------------------------------------------------------------------------
-  /**
+        assertEquals(expectedDefects.length, evaluationResult.getAllDefects().size());
+
+        EXPECTED_DEFECT_ITERATION:
+        for (UsabilityDefect expectedDefect : expectedDefects) {
+            for (UsabilityDefect defect : evaluationResult.getAllDefects()) {
+                if (expectedDefect.equals(defect)) {
+                    System.err.println(defect.getParameterizedDescription());
+                    continue EXPECTED_DEFECT_ITERATION;
+                }
+            }
+
+            for (UsabilityDefect defect : evaluationResult.getAllDefects()) {
+                System.err.println(defect);
+            }
+
+            fail("expected defect " + expectedDefect + " not found in evaluation result");
+        }
+    }
+
+    /**
    * 
    */
-  //-----------------------------------------------------------------------------------------------
-  private TaskTreeNode parseTask(Matcher tokenMatcher, int[] typeNumbers)
-  {
-    String firstToken = tokenMatcher.group();
-    
-    if ("}".equals(firstToken))
-    {
-      throw new IllegalArgumentException("found a closing bracket at an unexpected place");
-    }
-    
-    TaskTreeNode treeNode = instantiateTreeNode(tokenMatcher, typeNumbers);
-    
-    if (!tokenMatcher.find())
-    {
-      throw new IllegalArgumentException("could not parse task specification");
-    }
-    
-    firstToken = tokenMatcher.group();
-    
-    if (!"}".equals(firstToken))
-    {
-      TaskTreeNode child = null;
-    
-      do
-      {
-        child = parseTask(tokenMatcher, typeNumbers);
-        
-        if (child != null)
-        {
-          addChild(treeNode, child);
-          
-          if (!tokenMatcher.find())
-          {
+    private ITaskTreeNode parseTask(Matcher tokenMatcher, int[] typeNumbers) {
+        String firstToken = tokenMatcher.group();
+
+        if ("}".equals(firstToken)) {
+            throw new IllegalArgumentException("found a closing bracket at an unexpected place");
+        }
+
+        ITaskTreeNode treeNode = instantiateTreeNode(tokenMatcher, typeNumbers);
+
+        if (!tokenMatcher.find()) {
             throw new IllegalArgumentException("could not parse task specification");
-          }
-          
-          firstToken = tokenMatcher.group();
-          
-          if ("}".equals(firstToken))
-          {
-            break;
-          }
-        }
-        
-      }
-      while (child != null);
-      
-    }
-    
-    return treeNode;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param group
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private TaskTreeNode instantiateTreeNode(Matcher tokenMatcher, int[] typeNumbers)
-  {
-    String type = tokenMatcher.group(2);
-    String additionalInfo = tokenMatcher.group(4);
-    
-    if ("Interaction".equals(type))
-    {
-      return mTaskTreeNodeFactory.createNewInteractionTask
-        (new DummyGUIElement("dummy"), new DummyInteraction("dummy", typeNumbers[0]++));
-    }
-    else if ("Sequence".equals(type))
-    {
-      return mTaskTreeNodeFactory.createNewSequence();
-    }
-    else if ("Iteration".equals(type))
-    {
-      return mTaskTreeNodeFactory.createNewIteration();
-    }
-    else if ("Selection".equals(type))
-    {
-      return mTaskTreeNodeFactory.createNewSelection();
-    }
-    else if ("TextInput".equals(type))
-    {
-      if (additionalInfo == null)
-      {
-        fail("no simulated text provided for text input interactin task");
-      }
-      
-      TextInputInteractionTask task =
-        mTaskTreeNodeFactory.createNewTextInputInteractionTask(new DummyTextField(additionalInfo));
-     
-      task.setEnteredText(additionalInfo);
-      return task;
-    }
-    else
-    {
-      fail("invalid type of task tree node: " + type);
-      return null;
-    }
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param treeNode
-   * @param child
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void addChild(TaskTreeNode parent, TaskTreeNode child)
-  {
-    if (parent instanceof Sequence)
-    {
-      mTaskTreeBuilder.addChild((Sequence) parent, child);
-    }
-    else if (parent instanceof Iteration)
-    {
-      if (parent.getChildren().size() <= 0)
-      {
-        mTaskTreeBuilder.setChild((Iteration) parent, child);
-      }
-      else
-      {
-        fail("can not add more than one child to an iteration");
-      }
-    }
-    else if (parent instanceof Selection)
-    {
-      mTaskTreeBuilder.addChild((Selection) parent, child);
-    }
-    else if (parent instanceof TextInputInteractionTask)
-    {
-      mTaskTreeBuilder.addChild((TextInputInteractionTask) parent, child);
-    }
-    else
-    {
-      fail("can not add children to parent task tree node of type " + parent.getClass().getName());
-    }
-  }
+        }
+
+        firstToken = tokenMatcher.group();
+
+        if (!"}".equals(firstToken)) {
+            ITaskTreeNode child = null;
+
+            do {
+                child = parseTask(tokenMatcher, typeNumbers);
+
+                if (child != null) {
+                    addChild(treeNode, child);
+
+                    if (!tokenMatcher.find()) {
+                        throw new IllegalArgumentException("could not parse task specification");
+                    }
+
+                    firstToken = tokenMatcher.group();
+
+                    if ("}".equals(firstToken)) {
+                        break;
+                    }
+                }
+
+            }
+            while (child != null);
+
+        }
+
+        return treeNode;
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param group
+     * @return
+     */
+    private ITaskTreeNode instantiateTreeNode(Matcher tokenMatcher, int[] typeNumbers) {
+        String type = tokenMatcher.group(2);
+        String additionalInfo = tokenMatcher.group(4);
+
+        if ("Interaction".equals(type)) {
+            return taskTreeNodeFactory.createNewEventTask
+                (new DummyInteraction("dummy", typeNumbers[0]++), new DummyGUIElement("dummy"));
+        }
+        else if ("Sequence".equals(type)) {
+            return taskTreeNodeFactory.createNewSequence();
+        }
+        else if ("Iteration".equals(type)) {
+            return taskTreeNodeFactory.createNewIteration();
+        }
+        else if ("Selection".equals(type)) {
+            return taskTreeNodeFactory.createNewSelection();
+        }
+        else if ("TextInput".equals(type)) {
+            if (additionalInfo == null) {
+                fail("no simulated text provided for text input interactin task");
+            }
+
+            ITextInputEventTask task =
+                taskTreeNodeFactory.createNewTextInputEventTask(new DummyTextField(additionalInfo));
+
+            task.setEnteredText(additionalInfo);
+            return task;
+        }
+        else {
+            fail("invalid type of task tree node: " + type);
+            return null;
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param treeNode
+     * @param child
+     */
+    private void addChild(ITaskTreeNode parent, ITaskTreeNode child) {
+        if (parent instanceof ISequence) {
+            taskTreeBuilder.addChild((ISequence) parent, child);
+        }
+        else if (parent instanceof IIteration) {
+            if (parent.getChildren().size() <= 0) {
+                taskTreeBuilder.setChild((IIteration) parent, child);
+            }
+            else {
+                fail("can not add more than one child to an iteration");
+            }
+        }
+        else if (parent instanceof ISelection) {
+            taskTreeBuilder.addChild((ISelection) parent, child);
+        }
+        else if (parent instanceof ITextInputEventTask) {
+            taskTreeBuilder.addChild((ITextInputEventTask) parent, child);
+        }
+        else {
+            fail("can not add children to parent task tree node of type " +
+                 parent.getClass().getName());
+        }
+    }
 
 }
Index: /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/TextInputStatisticsRuleTest.java
===================================================================
--- /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/TextInputStatisticsRuleTest.java	(revision 560)
+++ /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/TextInputStatisticsRuleTest.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: TextInputStatisticsRuleTest.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 18.07.2012 $
@@ -5,5 +4,6 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
@@ -18,5 +18,4 @@
 import org.junit.Test;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -25,717 +24,660 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class TextInputStatisticsRuleTest extends AbstractUsabilityEvaluationTC
-{
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testWithDifferentTextInputInteractionsOnly()
-  {
-    UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
-    
-    // ===== check =====
-    String spec = "TextInput (bla) {}";
-    UsabilityDefect[] expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-    
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (bla) {}" +
-      "}";
-    
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-    
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a) {}" +
-      "  TextInput (b) {}" +
-      "  TextInput (c) {}" +
-      "  TextInput (d) {}" +
-      "}";
-    
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-    
-    // ===== check =====
-    spec =
-      "Selection {" +
-      "  TextInput (a) {}" +
-      "  TextInput (b) {}" +
-      "  TextInput (c) {}" +
-      "  TextInput (d) {}" +
-      "}";
-      
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO)
-    };
-      
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-      
-    // ===== check =====
-    spec =
-      "Iteration {" +
-      "  TextInput (bla) {}" +
-      "}";
-        
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO)
-    };
-      
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-        
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a) {}" +
-      "  Sequence {" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (d) {}" +
-      "    TextInput (e) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (f) {}" +
-      "  }" +
-      "  TextInput (g) {}" +
-      "  Selection {" +
-      "    TextInput (h) {}" +
-      "    TextInput (i) {}" +
-      "    TextInput (j) {}" +
-      "    TextInput (k) {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (l) {}" +
-      "    Sequence {" +
-      "      TextInput (m) {}" +
-      "      TextInput (n) {}" +
-      "      TextInput (o) {}" +
-      "      TextInput (p) {}" +
-      "    }" +
-      "    Iteration {" +
-      "      TextInput (q) {}" +
-      "    }" +
-      "    TextInput (r) {}" +
-      "    Selection {" +
-      "      TextInput (s) {}" +
-      "      TextInput (t) {}" +
-      "      TextInput (u) {}" +
-      "      TextInput (v) {}" +
-      "    }" +
-      "  }" +
-      "  Selection {" +
-      "    TextInput (w) {}" +
-      "    Sequence {" +
-      "      TextInput (x) {}" +
-      "      TextInput (y) {}" +
-      "      TextInput (z) {}" +
-      "      TextInput (aa) {}" +
-      "    }" +
-      "    Iteration {" +
-      "      TextInput (ab) {}" +
-      "    }" +
-      "    TextInput (ac) {}" +
-      "    Selection {" +
-      "      TextInput (ad) {}" +
-      "      TextInput (ae) {}" +
-      "      TextInput (af) {}" +
-      "      TextInput (ag) {}" +
-      "    }" +
-      "  }" +
-      "  TextInput (ah) {}" +
-      "}";
-     
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testCombinationsOfTextInputInteractionsAndOtherInteractions()
-  {
-    UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
-    
-    // ===== check =====
-    String spec =
-      "Sequence {" +
-      "  Interaction {}" +
-      "  TextInput (a) {}" +
-      "  TextInput (b) {}" +
-      "  Interaction {}" +
-      "  TextInput (c) {}" +
-      "}";
-      
-    UsabilityDefect[] expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-    
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  Interaction {}" +
-      "  TextInput (a) {}" +
-      "  Interaction {}" +
-      "  Interaction {}" +
-      "  TextInput (c) {}" +
-      "}";
-        
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(INFO, TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-      
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  Interaction {}" +
-      "  TextInput (a) {}" +
-      "  Interaction {}" +
-      "  Interaction {}" +
-      "  Interaction {}" +
-      "}";
-          
-    expectedDefects = new UsabilityDefect[0];
-        
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-        
-    // ===== check =====
-    spec =
-      "Selection {" +
-      "  Interaction {}" +
-      "  TextInput (a) {}" +
-      "  TextInput (b) {}" +
-      "  Interaction {}" +
-      "  TextInput (c) {}" +
-      "}";
-      
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO)
-    };
-      
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-      
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a) {}" +
-      "  Sequence {" +
-      "    Interaction {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    Interaction {}" +
-      "    TextInput (d) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (e) {}" +
-      "  }" +
-      "  Interaction {}" +
-      "  Selection {" +
-      "    Interaction {}" +
-      "    TextInput (f) {}" +
-      "    TextInput (g) {}" +
-      "    Interaction {}" +
-      "    TextInput (h) {}" +
-      "    TextInput (i) {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (j) {}" +
-      "    Sequence {" +
-      "      TextInput (k) {}" +
-      "      Interaction {}" +
-      "      TextInput (l) {}" +
-      "      TextInput (m) {}" +
-      "      Interaction {}" +
-      "      TextInput (n) {}" +
-      "      TextInput (o) {}" +
-      "    }" +
-      "    Iteration {" +
-      "      Interaction {}" +
-      "    }" +
-      "    Interaction {}" +
-      "    Selection {" +
-      "      TextInput (p) {}" +
-      "      TextInput (q) {}" +
-      "      TextInput (r) {}" +
-      "      Interaction {}" +
-      "      TextInput (s) {}" +
-      "      TextInput (t) {}" +
-      "      Interaction {}" +
-      "      TextInput (u) {}" +
-      "      TextInput (v) {}" +
-      "    }" +
-      "  }" +
-      "  Selection {" +
-      "    Interaction {}" +
-      "    Sequence {" +
-      "      TextInput (w) {}" +
-      "      Interaction {}" +
-      "      TextInput (x) {}" +
-      "      TextInput (y) {}" +
-      "      Interaction {}" +
-      "    }" +
-      "    Iteration {" +
-      "      TextInput (z) {}" +
-      "    }" +
-      "    TextInput (aa) {}" +
-      "    Selection {" +
-      "      TextInput (ab) {}" +
-      "      Interaction {}" +
-      "      TextInput (ac) {}" +
-      "      TextInput (ad) {}" +
-      "      Interaction {}" +
-      "      TextInput (ae) {}" +
-      "    }" +
-      "  }" +
-      "  Interaction {}" +
-      "}";
-     
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-    
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a) {}" +
-      "  Sequence {" +
-      "    Interaction {}" +
-      "    TextInput (b) {}" +
-      "    Interaction {}" +
-      "    Interaction {}" +
-      "    TextInput (c) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (d) {}" +
-      "  }" +
-      "  Interaction {}" +
-      "  Selection {" +
-      "    Interaction {}" +
-      "    TextInput (e) {}" +
-      "    Interaction {}" +
-      "    Interaction {}" +
-      "    TextInput (g) {}" +
-      "    Interaction {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (i) {}" +
-      "    Sequence {" +
-      "      TextInput (j) {}" +
-      "      Interaction {}" +
-      "      TextInput (k) {}" +
-      "      Interaction {}" +
-      "      Interaction {}" +
-      "      TextInput (m) {}" +
-      "      Interaction {}" +
-      "    }" +
-      "    Iteration {" +
-      "      Interaction {}" +
-      "    }" +
-      "    Interaction {}" +
-      "    Selection {" +
-      "      TextInput (o) {}" +
-      "      Interaction {}" +
-      "      Interaction {}" +
-      "      Interaction {}" +
-      "      Interaction {}" +
-      "      TextInput (s) {}" +
-      "      Interaction {}" +
-      "      TextInput (t) {}" +
-      "      TextInput (u) {}" +
-      "    }" +
-      "  }" +
-      "  Selection {" +
-      "    Interaction {}" +
-      "    Sequence {" +
-      "      TextInput (v) {}" +
-      "      Interaction {}" +
-      "      Interaction {}" +
-      "      TextInput (x) {}" +
-      "      Interaction {}" +
-      "    }" +
-      "    Iteration {" +
-      "      TextInput (y) {}" +
-      "    }" +
-      "    TextInput (z) {}" +
-      "    Selection {" +
-      "      TextInput (aa) {}" +
-      "      Interaction {}" +
-      "      TextInput (ab) {}" +
-      "      Interaction {}" +
-      "      Interaction {}" +
-      "      TextInput (ad) {}" +
-      "    }" +
-      "  }" +
-      "  Interaction {}" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(INFO, TEXT_FIELD_INPUT_RATIO)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testTextEntryRepetitions()
-  {
-    UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
-    
-    // ===== check =====
-    String spec =
-      "Sequence {" +
-      "  TextInput (a b c) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (a) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (a) {}" +
-      "  }" +
-      "  TextInput (a) {}" +
-      "  Selection {" +
-      "    TextInput (b c) {}" +
-      "    TextInput (a) {}" +
-      "    TextInput (a c) {}" +
-      "    TextInput (b a) {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (b c) {}" +
-      "    Sequence {" +
-      "      TextInput (d a c) {}" +
-      "      TextInput (b b b a) {}" +
-      "      TextInput (a a c c) {}" +
-      "      TextInput (b b a) {}" +
-      "    }" +
-      "  }" +
-      "  TextInput (d) {}" +
-      "}";
-     
-    UsabilityDefect[] expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a b c d e f g h i j k l m) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (d) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (e) {}" +
-      "  }" +
-      "  TextInput (f) {}" +
-      "  Selection {" +
-      "    TextInput (g) {}" +
-      "    TextInput (h) {}" +
-      "    TextInput (i) {}" +
-      "    TextInput (j) {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (k) {}" +
-      "    Sequence {" +
-      "      TextInput (l) {}" +
-      "      TextInput (m) {}" +
-      "      TextInput (n) {}" +
-      "      TextInput (o) {}" +
-      "    }" +
-      "  }" +
-      "  TextInput (p) {}" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a b c d e f g h i j k l m) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (d) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (e) {}" +
-      "  }" +
-      "  TextInput (a) {}" +
-      "  Selection {" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (d) {}" +
-      "    TextInput (e) {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    Sequence {" +
-      "      TextInput (b) {}" +
-      "      TextInput (c) {}" +
-      "      TextInput (d) {}" +
-      "      TextInput (e) {}" +
-      "    }" +
-      "  }" +
-      "  TextInput (f) {}" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
- 
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a b c d e f g h i j k l m) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (a) {}" +
-      "  }" +
-      "  Iteration {" +
-      "    TextInput (b) {}" +
-      "  }" +
-      "  TextInput (c) {}" +
-      "  Selection {" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "    TextInput (a) {}" +
-      "  }" +
-      "  Sequence {" +
-      "    TextInput (b) {}" +
-      "    Sequence {" +
-      "      TextInput (c) {}" +
-      "      TextInput (a) {}" +
-      "      TextInput (b) {}" +
-      "      TextInput (c) {}" +
-      "    }" +
-      "  }" +
-      "  TextInput (a) {}" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-   
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a b c) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "    TextInput (c) {}" +
-      "  }" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-     
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a b c) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (a) {}" +
-      "    TextInput (b) {}" +
-      "  }" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-       
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (a b c) {}" +
-      "  Sequence {" +
-      "    TextInput (a) {}" +
-      "    TextInput (d) {}" +
-      "    TextInput (e) {}" +
-      "  }" +
-      "}";
-
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(INFO, TEXT_FIELD_INPUT_REPETITIONS)
-    };
-
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
-         
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testNoLetterOrDigitInput()
-  {
-    UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
-    
-    // ===== check =====
-    String spec =
-      "Sequence {" +
-      "  TextInput (_a_b_c_) {}" +
-      "}";
-     
-    UsabilityDefect[] expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(HIGH, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (12345_6789012345) {}" +
-      "}";
-     
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(MEDIUM, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (123456789012345678901234567890_123456789012345) {}" +
-      "}";
-     
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(LOW, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-
-    // ===== check =====
-    spec =
-      "Sequence {" +
-      "  TextInput (1234567890123456789012345678901234567890123456789_01234567890" +
-      "12345678901234567890123456789012345) {}" +
-      "}";
-     
-    expectedDefects = new UsabilityDefect[]
-    {
-      new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
-      new UsabilityDefect(INFO, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO)
-    };
-    
-    assertUsabilityEvaluationResult
-      (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));   
-
-  }
+public class TextInputStatisticsRuleTest extends AbstractUsabilityEvaluationTC {
+
+    /**
+     * TODO: comment
+     * 
+     */
+    @Test
+    public void testWithDifferentTextInputInteractionsOnly() {
+        UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
+
+        // ===== check =====
+        String spec =
+            "TextInput (bla) {}";
+        UsabilityDefect[] expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (bla) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a) {}" +
+            "  TextInput (b) {}" +
+            "  TextInput (c) {}" +
+            "  TextInput (d) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Selection {" +
+            "  TextInput (a) {}" +
+            "  TextInput (b) {}" +
+            "  TextInput (c) {}" +
+            "  TextInput (d) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Iteration {" +
+            "  TextInput (bla) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a) {}" +
+            "  Sequence {" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (d) {}" +
+            "    TextInput (e) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (f) {}" +
+            "  }" +
+            "  TextInput (g) {}" +
+            "  Selection {" +
+            "    TextInput (h) {}" +
+            "    TextInput (i) {}" +
+            "    TextInput (j) {}" +
+            "    TextInput (k) {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (l) {}" +
+            "    Sequence {" +
+            "      TextInput (m) {}" +
+            "      TextInput (n) {}" +
+            "      TextInput (o) {}" +
+            "      TextInput (p) {}" +
+            "    }" +
+            "    Iteration {" +
+            "      TextInput (q) {}" +
+            "    }" +
+            "    TextInput (r) {}" +
+            "    Selection {" +
+            "      TextInput (s) {}" +
+            "      TextInput (t) {}" +
+            "      TextInput (u) {}" +
+            "      TextInput (v) {}" +
+            "    }" +
+            "  }" +
+            "  Selection {" +
+            "    TextInput (w) {}" +
+            "    Sequence {" +
+            "      TextInput (x) {}" +
+            "      TextInput (y) {}" +
+            "      TextInput (z) {}" +
+            "      TextInput (aa) {}" +
+            "    }" +
+            "    Iteration {" +
+            "      TextInput (ab) {}" +
+            "    }" +
+            "    TextInput (ac) {}" +
+            "    Selection {" +
+            "      TextInput (ad) {}" +
+            "      TextInput (ae) {}" +
+            "      TextInput (af) {}" +
+            "      TextInput (ag) {}" +
+            "    }" +
+            "  }" +
+            "  TextInput (ah) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+    }
+
+    /**
+     * TODO: comment
+     * 
+     */
+    @Test
+    public void testCombinationsOfTextInputInteractionsAndOtherInteractions() {
+        UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
+
+        // ===== check =====
+        String spec =
+            "Sequence {" +
+            "  Interaction {}" +
+            "  TextInput (a) {}" +
+            "  TextInput (b) {}" +
+            "  Interaction {}" +
+            "  TextInput (c) {}" +
+            "}";
+
+        UsabilityDefect[] expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  Interaction {}" +
+            "  TextInput (a) {}" +
+            "  Interaction {}" +
+            "  Interaction {}" +
+            "  TextInput (c) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(INFO, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  Interaction {}" +
+            "  TextInput (a) {}" +
+            "  Interaction {}" +
+            "  Interaction {}" +
+            "  Interaction {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[0];
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Selection {" +
+            "  Interaction {}" +
+            "  TextInput (a) {}" +
+            "  TextInput (b) {}" +
+            "  Interaction {}" +
+            "  TextInput (c) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a) {}" +
+            "  Sequence {" +
+            "    Interaction {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    Interaction {}" +
+            "    TextInput (d) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (e) {}" +
+            "  }" +
+            "  Interaction {}" +
+            "  Selection {" +
+            "    Interaction {}" +
+            "    TextInput (f) {}" +
+            "    TextInput (g) {}" +
+            "    Interaction {}" +
+            "    TextInput (h) {}" +
+            "    TextInput (i) {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (j) {}" +
+            "    Sequence {" +
+            "      TextInput (k) {}" +
+            "      Interaction {}" +
+            "      TextInput (l) {}" +
+            "      TextInput (m) {}" +
+            "      Interaction {}" +
+            "      TextInput (n) {}" +
+            "      TextInput (o) {}" +
+            "    }" +
+            "    Iteration {" +
+            "      Interaction {}" +
+            "    }" +
+            "    Interaction {}" +
+            "    Selection {" +
+            "      TextInput (p) {}" +
+            "      TextInput (q) {}" +
+            "      TextInput (r) {}" +
+            "      Interaction {}" +
+            "      TextInput (s) {}" +
+            "      TextInput (t) {}" +
+            "      Interaction {}" +
+            "      TextInput (u) {}" +
+            "      TextInput (v) {}" +
+            "    }" +
+            "  }" +
+            "  Selection {" +
+            "    Interaction {}" +
+            "    Sequence {" +
+            "      TextInput (w) {}" +
+            "      Interaction {}" +
+            "      TextInput (x) {}" +
+            "      TextInput (y) {}" +
+            "      Interaction {}" +
+            "    }" +
+            "    Iteration {" +
+            "      TextInput (z) {}" +
+            "    }" +
+            "    TextInput (aa) {}" +
+            "    Selection {" +
+            "      TextInput (ab) {}" +
+            "      Interaction {}" +
+            "      TextInput (ac) {}" +
+            "      TextInput (ad) {}" +
+            "      Interaction {}" +
+            "      TextInput (ae) {}" +
+            "    }" +
+            "  }" +
+            "  Interaction {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(LOW, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a) {}" +
+            "  Sequence {" +
+            "    Interaction {}" +
+            "    TextInput (b) {}" +
+            "    Interaction {}" +
+            "    Interaction {}" +
+            "    TextInput (c) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (d) {}" +
+            "  }" +
+            "  Interaction {}" +
+            "  Selection {" +
+            "    Interaction {}" +
+            "    TextInput (e) {}" +
+            "    Interaction {}" +
+            "    Interaction {}" +
+            "    TextInput (g) {}" +
+            "    Interaction {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (i) {}" +
+            "    Sequence {" +
+            "      TextInput (j) {}" +
+            "      Interaction {}" +
+            "      TextInput (k) {}" +
+            "      Interaction {}" +
+            "      Interaction {}" +
+            "      TextInput (m) {}" +
+            "      Interaction {}" +
+            "    }" +
+            "    Iteration {" +
+            "      Interaction {}" +
+            "    }" +
+            "    Interaction {}" +
+            "    Selection {" +
+            "      TextInput (o) {}" +
+            "      Interaction {}" +
+            "      Interaction {}" +
+            "      Interaction {}" +
+            "      Interaction {}" +
+            "      TextInput (s) {}" +
+            "      Interaction {}" +
+            "      TextInput (t) {}" +
+            "      TextInput (u) {}" +
+            "    }" +
+            "  }" +
+            "  Selection {" +
+            "    Interaction {}" +
+            "    Sequence {" +
+            "      TextInput (v) {}" +
+            "      Interaction {}" +
+            "      Interaction {}" +
+            "      TextInput (x) {}" +
+            "      Interaction {}" +
+            "    }" +
+            "    Iteration {" +
+            "      TextInput (y) {}" +
+            "    }" +
+            "    TextInput (z) {}" +
+            "    Selection {" +
+            "      TextInput (aa) {}" +
+            "      Interaction {}" +
+            "      TextInput (ab) {}" +
+            "      Interaction {}" +
+            "      Interaction {}" +
+            "      TextInput (ad) {}" +
+            "    }" +
+            "  }" +
+            "  Interaction {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(INFO, TEXT_FIELD_INPUT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+    }
+
+    /**
+     * TODO: comment
+     * 
+     */
+    @Test
+    public void testTextEntryRepetitions() {
+        UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
+
+        // ===== check =====
+        String spec =
+            "Sequence {" +
+            "  TextInput (a b c) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (a) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (a) {}" +
+            "  }" +
+            "  TextInput (a) {}" +
+            "  Selection {" +
+            "    TextInput (b c) {}" +
+            "    TextInput (a) {}" +
+            "    TextInput (a c) {}" +
+            "    TextInput (b a) {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (b c) {}" +
+            "    Sequence {" +
+            "      TextInput (d a c) {}" +
+            "      TextInput (b b b a) {}" +
+            "      TextInput (a a c c) {}" +
+            "      TextInput (b b a) {}" +
+            "    }" +
+            "  }" +
+            "  TextInput (d) {}" +
+            "}";
+
+        UsabilityDefect[] expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a b c d e f g h i j k l m) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (d) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (e) {}" +
+            "  }" +
+            "  TextInput (f) {}" +
+            "  Selection {" +
+            "    TextInput (g) {}" +
+            "    TextInput (h) {}" +
+            "    TextInput (i) {}" +
+            "    TextInput (j) {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (k) {}" +
+            "    Sequence {" +
+            "      TextInput (l) {}" +
+            "      TextInput (m) {}" +
+            "      TextInput (n) {}" +
+            "      TextInput (o) {}" +
+            "    }" +
+            "  }" +
+            "  TextInput (p) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a b c d e f g h i j k l m) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (d) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (e) {}" +
+            "  }" +
+            "  TextInput (a) {}" +
+            "  Selection {" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (d) {}" +
+            "    TextInput (e) {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    Sequence {" +
+            "      TextInput (b) {}" +
+            "      TextInput (c) {}" +
+            "      TextInput (d) {}" +
+            "      TextInput (e) {}" +
+            "    }" +
+            "  }" +
+            "  TextInput (f) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a b c d e f g h i j k l m) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (a) {}" +
+            "  }" +
+            "  Iteration {" +
+            "    TextInput (b) {}" +
+            "  }" +
+            "  TextInput (c) {}" +
+            "  Selection {" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "    TextInput (a) {}" +
+            "  }" +
+            "  Sequence {" +
+            "    TextInput (b) {}" +
+            "    Sequence {" +
+            "      TextInput (c) {}" +
+            "      TextInput (a) {}" +
+            "      TextInput (b) {}" +
+            "      TextInput (c) {}" +
+            "    }" +
+            "  }" +
+            "  TextInput (a) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(MEDIUM, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a b c) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "    TextInput (c) {}" +
+            "  }" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a b c) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (a) {}" +
+            "    TextInput (b) {}" +
+            "  }" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(LOW, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (a b c) {}" +
+            "  Sequence {" +
+            "    TextInput (a) {}" +
+            "    TextInput (d) {}" +
+            "    TextInput (e) {}" +
+            "  }" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(INFO, TEXT_FIELD_INPUT_REPETITIONS) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+    }
+
+    /**
+     * TODO: comment
+     * 
+     */
+    @Test
+    public void testNoLetterOrDigitInput() {
+        UsabilityEvaluationManager manager = new UsabilityEvaluationManager();
+
+        // ===== check =====
+        String spec =
+            "Sequence {" +
+            "  TextInput (_a_b_c_) {}" +
+            "}";
+
+        UsabilityDefect[] expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(HIGH, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (12345_6789012345) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(MEDIUM, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (123456789012345678901234567890_123456789012345) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(LOW, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+        // ===== check =====
+        spec =
+            "Sequence {" +
+            "  TextInput (1234567890123456789012345678901234567890123456789_01234567890" +
+            "12345678901234567890123456789012345) {}" +
+            "}";
+
+        expectedDefects = new UsabilityDefect[]
+            { new UsabilityDefect(HIGH, TEXT_FIELD_INPUT_RATIO),
+              new UsabilityDefect(INFO, TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO) };
+
+        assertUsabilityEvaluationResult
+            (expectedDefects, manager.evaluateUsability(createTaskTree(spec)));
+
+    }
 }
Index: /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/UsabilityDefectDescriptionTest.java
===================================================================
--- /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/UsabilityDefectDescriptionTest.java	(revision 560)
+++ /trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/UsabilityDefectDescriptionTest.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityDefectDescriptionTest.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 20.07.2012 $
@@ -5,5 +4,6 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
@@ -16,5 +16,4 @@
 import org.junit.Test;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -23,48 +22,37 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class UsabilityDefectDescriptionTest
-{
+public class UsabilityDefectDescriptionTest {
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testInitialization()
-  {
-    for (UsabilityDefectDescription description : UsabilityDefectDescription.values())
-    {
-      assertNotNull(description.toString());
-      assertNotSame("", description.toString());
-      System.err.println(description);
+    /**
+     * TODO: comment
+     * 
+     */
+    @Test
+    public void testInitialization() {
+        for (UsabilityDefectDescription description : UsabilityDefectDescription.values()) {
+            assertNotNull(description.toString());
+            assertNotSame("", description.toString());
+            System.err.println(description);
+        }
     }
-  }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Test
-  public void testParameterization()
-  {
-    for (UsabilityDefectDescription description : UsabilityDefectDescription.values())
-    {
-      Map<String, String> parameters = new HashMap<String, String>();
-      
-      for (String parameter : description.getDescriptionParameters())
-      {
-        parameters.put(parameter, "<parameter " + parameter + ">");
-      }
-      
-      assertNotNull(description.toString(parameters));
-      assertNotSame("", description.toString(parameters));
-      System.err.println(description.toString(parameters));
+    /**
+     * TODO: comment
+     * 
+     */
+    @Test
+    public void testParameterization() {
+        for (UsabilityDefectDescription description : UsabilityDefectDescription.values()) {
+            Map<String, String> parameters = new HashMap<String, String>();
+
+            for (String parameter : description.getDescriptionParameters()) {
+                parameters.put(parameter, "<parameter " + parameter + ">");
+            }
+
+            assertNotNull(description.toString(parameters));
+            assertNotSame("", description.toString(parameters));
+            System.err.println(description.toString(parameters));
+        }
     }
-  }
 
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/TextInputStatisticsRule.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/TextInputStatisticsRule.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/TextInputStatisticsRule.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: TextInputStatisticsRule.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
@@ -5,5 +4,6 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
@@ -14,11 +14,10 @@
 import java.util.Map;
 
-import de.ugoe.cs.quest.eventcore.guimodel.TextArea;
-import de.ugoe.cs.quest.eventcore.guimodel.TextField;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTree;
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode;
-import de.ugoe.cs.quest.tasktrees.treeifc.TextInputInteractionTask;
-
-//-------------------------------------------------------------------------------------------------
+import de.ugoe.cs.quest.eventcore.guimodel.ITextArea;
+import de.ugoe.cs.quest.eventcore.guimodel.ITextField;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTreeNode;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITextInputEventTask;
+
 /**
  * TODO comment
@@ -27,457 +26,378 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class TextInputStatisticsRule implements de.ugoe.cs.quest.usability.UsabilityEvaluationRule
-{
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see de.ugoe.cs.usability.UsabilityEvaluationRule#evaluate(TaskTree)
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public UsabilityEvaluationResult evaluate(TaskTree taskTree)
-  {
-    TextInputStatistics statistics = new TextInputStatistics();
-    calculateStatistics(taskTree.getRoot(), statistics);
-    
-    UsabilityEvaluationResult results = new UsabilityEvaluationResult();
-    analyzeStatistics(statistics, results);
-    
-    return results;
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param statistics
-   * @param results
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void analyzeStatistics(TextInputStatistics statistics, UsabilityEvaluationResult results)
-  {
-    checkTextInputRatio(statistics, results);
-    checkTextFieldEntryRepetitions(statistics, results);
-    checkTextFieldNoLetterOrDigitInputs(statistics, results);
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param statistics
-   * @param results 
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void checkTextInputRatio(TextInputStatistics       statistics,
+public class TextInputStatisticsRule implements de.ugoe.cs.quest.usability.UsabilityEvaluationRule {
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.usability.UsabilityEvaluationRule#evaluate(TaskTree)
+     */
+    @Override
+    public UsabilityEvaluationResult evaluate(ITaskTree taskTree) {
+        TextInputStatistics statistics = new TextInputStatistics();
+        calculateStatistics(taskTree.getRoot(), statistics);
+
+        UsabilityEvaluationResult results = new UsabilityEvaluationResult();
+        analyzeStatistics(statistics, results);
+
+        return results;
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param statistics
+     * @param results
+     */
+    private void analyzeStatistics(TextInputStatistics       statistics,
                                    UsabilityEvaluationResult results)
-  {
-    float allTextFieldInputs =
-      statistics.getNoOfTextFieldInputs() + statistics.getNoOfTextAreaInputs();
-    
-    float ratio = allTextFieldInputs / (float) statistics.getNoOfAllInteractions();
-    
-    UsabilityDefectSeverity severity = null;
-    if (ratio > 0.9)
     {
-      severity = UsabilityDefectSeverity.HIGH;
-    }
-    else if (ratio > 0.7)
+        checkTextInputRatio(statistics, results);
+        checkTextFieldEntryRepetitions(statistics, results);
+        checkTextFieldNoLetterOrDigitInputs(statistics, results);
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param statistics
+     * @param results
+     */
+    private void checkTextInputRatio(TextInputStatistics       statistics,
+                                     UsabilityEvaluationResult results)
     {
-      severity = UsabilityDefectSeverity.MEDIUM;
-    }
-    else if (ratio > 0.5)
+        float allTextFieldInputs =
+            statistics.getNoOfTextFieldInputs() + statistics.getNoOfTextAreaInputs();
+
+        float ratio = allTextFieldInputs / (float) statistics.getNoOfAllEvents();
+
+        UsabilityDefectSeverity severity = null;
+        if (ratio > 0.9) {
+            severity = UsabilityDefectSeverity.HIGH;
+        }
+        else if (ratio > 0.7) {
+            severity = UsabilityDefectSeverity.MEDIUM;
+        }
+        else if (ratio > 0.5) {
+            severity = UsabilityDefectSeverity.LOW;
+        }
+        else if (ratio > 0.3) {
+            severity = UsabilityDefectSeverity.INFO;
+        }
+
+        if (severity != null) {
+            Map<String, String> parameters = new HashMap<String, String>();
+            parameters.put("textInputRatio", DecimalFormat.getInstance().format(ratio * 100) + "%");
+
+            results.addDefect
+                (new UsabilityDefect(severity, UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO,
+                                     parameters));
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param statistics
+     * @param results
+     */
+    private void checkTextFieldEntryRepetitions(TextInputStatistics       statistics,
+                                                UsabilityEvaluationResult results)
     {
-      severity = UsabilityDefectSeverity.LOW;
-    }
-    else if (ratio > 0.3)
+        Map<String, Integer> words = new HashMap<String, Integer>();
+        int numberOfRepeatedWords = 0;
+        int maxRepetitions = 0;
+
+        for (int i = 0; i < statistics.getNoOfTextFieldInputs(); i++) {
+            String[] fragments = statistics.getTextFieldInputFragments(i);
+            for (String fragment : fragments) {
+                if (!"".equals(fragment.trim())) {
+                    Integer count = words.get(fragment);
+                    if (count == null) {
+                        words.put(fragment, 1);
+                    }
+                    else {
+                        count++;
+                        words.put(fragment, count);
+                        maxRepetitions = Math.max(count, maxRepetitions);
+
+                        if (count == 2) {
+                            // do not calculate repeated words several times
+                            numberOfRepeatedWords++;
+                        }
+                    }
+                }
+            }
+        }
+
+        UsabilityDefectSeverity severity = null;
+        if ((numberOfRepeatedWords > 10) || (maxRepetitions > 10)) {
+            severity = UsabilityDefectSeverity.HIGH;
+        }
+        else if ((numberOfRepeatedWords > 4) || (maxRepetitions > 4)) {
+            severity = UsabilityDefectSeverity.MEDIUM;
+        }
+        else if ((numberOfRepeatedWords > 2) || (maxRepetitions > 2)) {
+            severity = UsabilityDefectSeverity.LOW;
+        }
+        else if ((numberOfRepeatedWords > 1) || (maxRepetitions > 1)) {
+            severity = UsabilityDefectSeverity.INFO;
+        }
+
+        if (severity != null) {
+            Map<String, String> parameters = new HashMap<String, String>();
+            parameters.put("textRepetitionRatio", numberOfRepeatedWords +
+                           " repeated tokens, up to " + maxRepetitions + " repetitions per token");
+
+            results.addDefect
+                (new UsabilityDefect(severity,
+                                     UsabilityDefectDescription.TEXT_FIELD_INPUT_REPETITIONS,
+                                     parameters));
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param statistics
+     * @param results
+     */
+    private void checkTextFieldNoLetterOrDigitInputs(TextInputStatistics       statistics,
+                                                     UsabilityEvaluationResult results)
     {
-      severity = UsabilityDefectSeverity.INFO;
-    }
-    
-    if (severity != null)
-    {
-      Map<String, String> parameters = new HashMap<String, String>();
-      parameters.put("textInputRatio", DecimalFormat.getInstance().format(ratio * 100) + "%");
-      
-      results.addDefect
-        (new UsabilityDefect
-           (severity, UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO, parameters));
-    }
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param statistics
-   * @param results
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void checkTextFieldEntryRepetitions(TextInputStatistics       statistics,
-                                              UsabilityEvaluationResult results)
-  {
-    Map<String, Integer> words = new HashMap<String, Integer>();
-    int numberOfRepeatedWords = 0;
-    int maxRepetitions = 0;
-
-    for (int i = 0; i < statistics.getNoOfTextFieldInputs(); i++)
-    {
-      String[] fragments = statistics.getTextFieldInputFragments(i);
-      for (String fragment : fragments)
-      {
-        if (!"".equals(fragment.trim()))
+        int allCharactersCount = 0;
+        int noLetterOrDigitCount = 0;
+
+        for (int i = 0; i < statistics.getNoOfTextFieldInputs(); i++) {
+            String[] fragments = statistics.getTextFieldInputFragments(i);
+            for (String fragment : fragments) {
+                String effectiveFragment = fragment.trim();
+                for (int j = 0; j < effectiveFragment.length(); j++) {
+                    if (!Character.isWhitespace(effectiveFragment.charAt(j))) {
+                        if (!Character.isLetterOrDigit(effectiveFragment.charAt(j))) {
+                            noLetterOrDigitCount++;
+                        }
+                        allCharactersCount++;
+                    }
+                }
+            }
+        }
+
+        float ratio = (float) noLetterOrDigitCount / (float) allCharactersCount;
+
+        UsabilityDefectSeverity severity = null;
+        if (ratio > 0.1) // every 10th sign
         {
-          Integer count = words.get(fragment);
-          if (count == null)
-          {
-            words.put(fragment, 1);
-          }
-          else
-          {
-            count++;
-            words.put(fragment, count);
-            maxRepetitions = Math.max(count, maxRepetitions);
-
-            if (count == 2)
-            {
-              // do not calculate repeated words several times
-              numberOfRepeatedWords++;
+            severity = UsabilityDefectSeverity.HIGH;
+        }
+        else if (ratio > 0.05) // every 20th sign
+        {
+            severity = UsabilityDefectSeverity.MEDIUM;
+        }
+        else if (ratio > 0.02) // every 50th sign
+        {
+            severity = UsabilityDefectSeverity.LOW;
+        }
+        else if (ratio > 0.01) // every 100th sign
+        {
+            severity = UsabilityDefectSeverity.INFO;
+        }
+
+        if (severity != null) {
+            Map<String, String> parameters = new HashMap<String, String>();
+            parameters.put("noLetterOrDigitRatio", allCharactersCount + " entered characters of " +
+                           "which " + noLetterOrDigitCount + " were no letter or digit");
+
+            results.addDefect
+                (new UsabilityDefect(severity,
+                                     UsabilityDefectDescription.TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO,
+                                     parameters));
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param taskTree
+     * @param statistics
+     */
+    private void calculateStatistics(ITaskTreeNode node, TextInputStatistics statistics) {
+        if (node instanceof ITextInputEventTask) {
+            calculateStatistics((ITextInputEventTask) node, statistics);
+        }
+        else {
+            if ((node.getChildren() == null) || (node.getChildren().size() == 0)) {
+                statistics.incrementNoOfOtherEventTasks();
             }
-          }
-        }
-      }
-    }
-    
-    UsabilityDefectSeverity severity = null;
-    if ((numberOfRepeatedWords > 10) || (maxRepetitions > 10))
-    {
-      severity = UsabilityDefectSeverity.HIGH;
-    }
-    else if ((numberOfRepeatedWords > 4) || (maxRepetitions > 4))
-    {
-      severity = UsabilityDefectSeverity.MEDIUM;
-    }
-    else if ((numberOfRepeatedWords > 2) || (maxRepetitions > 2))
-    {
-      severity = UsabilityDefectSeverity.LOW;
-    }
-    else if ((numberOfRepeatedWords > 1) || (maxRepetitions > 1))
-    {
-      severity = UsabilityDefectSeverity.INFO;
-    }
-    
-    if (severity != null)
-    {
-      Map<String, String> parameters = new HashMap<String, String>();
-      parameters.put("textRepetitionRatio", numberOfRepeatedWords + " repeated tokens, up to " +
-                     maxRepetitions + " repetitions per token");
-
-      results.addDefect
-        (new UsabilityDefect
-           (severity, UsabilityDefectDescription.TEXT_FIELD_INPUT_REPETITIONS, parameters));
-    }
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param statistics
-   * @param results
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void checkTextFieldNoLetterOrDigitInputs(TextInputStatistics       statistics,
-                                                   UsabilityEvaluationResult results)
-  {
-    int allCharactersCount = 0;
-    int noLetterOrDigitCount = 0;
-
-    for (int i = 0; i < statistics.getNoOfTextFieldInputs(); i++)
-    {
-      String[] fragments = statistics.getTextFieldInputFragments(i);
-      for (String fragment : fragments)
-      {
-        String effectiveFragment = fragment.trim();
-        for (int j = 0; j < effectiveFragment.length(); j++)
-        {
-          if (!Character.isWhitespace(effectiveFragment.charAt(j)))
-          {
-            if (!Character.isLetterOrDigit(effectiveFragment.charAt(j)))
-            {
-              noLetterOrDigitCount++;
+            else {
+                for (ITaskTreeNode child : node.getChildren()) {
+                    calculateStatistics(child, statistics);
+                }
             }
-            allCharactersCount++;
-          }
-        }
-      }
-    }
-    
-    float ratio = (float) noLetterOrDigitCount / (float) allCharactersCount;
-    
-    UsabilityDefectSeverity severity = null;
-    if (ratio > 0.1) // every 10th sign
-    {
-      severity = UsabilityDefectSeverity.HIGH;
-    }
-    else if (ratio > 0.05) // every 20th sign
-    {
-      severity = UsabilityDefectSeverity.MEDIUM;
-    }
-    else if (ratio > 0.02) // every 50th sign
-    {
-      severity = UsabilityDefectSeverity.LOW;
-    }
-    else if (ratio > 0.01) // every 100th sign
-    {
-      severity = UsabilityDefectSeverity.INFO;
-    }
-    
-    if (severity != null)
-    {
-      Map<String, String> parameters = new HashMap<String, String>();
-      parameters.put("noLetterOrDigitRatio", allCharactersCount + " entered characters of " +
-                     "which " + noLetterOrDigitCount + " were no letter or digit");
-
-      results.addDefect
-        (new UsabilityDefect
-           (severity, UsabilityDefectDescription.TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO, parameters));
-    }
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param taskTree
-   * @param statistics
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void calculateStatistics(TaskTreeNode node, TextInputStatistics statistics)
-  {
-    if (node instanceof TextInputInteractionTask)
-    {
-      calculateStatistics((TextInputInteractionTask) node, statistics);
-    }
-    else
-    {
-      if ((node.getChildren() == null) ||
-          (node.getChildren().size() == 0))
-      {
-        statistics.incrementNoOfOtherInteractionTasks();
-      }
-      else
-      {
-        for (TaskTreeNode child : node.getChildren())
-        {
-          calculateStatistics(child, statistics);
-        }
-      }
-    }
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param taskTree
-   * @param statistics
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void calculateStatistics(TextInputInteractionTask node, TextInputStatistics statistics)
-  {
-    String[] fragments = determineTextFragments(node.getEnteredText());
-    
-    if (node.getGUIElement() instanceof TextField)
-    {
-      statistics.addTextFieldInput(node, fragments);
-    }
-    else if (node.getGUIElement() instanceof TextArea)
-    {
-      statistics.addTextAreaInput(node, fragments);
-    }
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param enteredText
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private String[] determineTextFragments(String enteredText)
-  {
-    List<String> fragments = new ArrayList<String>();
-    
-    StringBuffer fragment = new StringBuffer();
-    char lastChar = 0;
-    
-    for (int i = 0; i < enteredText.length(); i++)
-    {
-      char currentChar = enteredText.charAt(i);
-      
-      if (!isEqualCharacterType(lastChar, currentChar))
-      {
-        // the previous fragment ended. so finalize it and start a new one
-        if ((fragment != null) && (fragment.length() > 0))
-        {
-          fragments.add(fragment.toString());
-          fragment = new StringBuffer();
-        }
-      }
-
-      fragment.append(currentChar);
-      lastChar = currentChar;
-    }
-    
-    if ((fragment != null) && (fragment.length() > 0))
-    {
-      fragments.add(fragment.toString());
-    }
-    
-    return fragments.toArray(new String[fragments.size()]);
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param lastChar
-   * @param currentChar
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private boolean isEqualCharacterType(char char1, char char2)
-  {
-    return
-      ((char1 == char2) ||
-       (Character.isWhitespace(char1) && Character.isWhitespace(char2)) ||
-       (Character.isDigit(char1) && Character.isDigit(char2)) ||
-       (Character.isLetter(char1) && Character.isLetter(char2)) ||
-       (Character.isJavaIdentifierPart(char1) && Character.isJavaIdentifierPart(char2)));
-  }
-
-  //-------------------------------------------------------------------------------------------------
-  /**
-   * TODO comment
-   * 
-   * @version $Revision: $ $Date: 16.07.2012$
-   * @author 2012, last modified by $Author: pharms$
-   */
-  //-------------------------------------------------------------------------------------------------
-  public static class TextInputStatistics
-  {
-    /** */
-    private List<Object[]> mTextFieldInputs = new ArrayList<Object[]>();
-    
-    /** */
-    private List<Object[]> mTextAreaInputs = new ArrayList<Object[]>();
-    
-    /** */
-    private int mOtherInteractionsCount;
-    
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     * @param node 
-     * @param fragments 
-     *
-     */
-    //-----------------------------------------------------------------------------------------------
-    public void addTextFieldInput(TextInputInteractionTask node, String[] fragments)
-    {
-      mTextFieldInputs.add(new Object[] { node, fragments });
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     * @param node 
-     * @param fragments 
-     *
-     */
-    //-----------------------------------------------------------------------------------------------
-    public void addTextAreaInput(TextInputInteractionTask node, String[] fragments)
-    {
-      mTextAreaInputs.add(new Object[] { node, fragments });
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     *
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param taskTree
+     * @param statistics
+     */
+    private void calculateStatistics(ITextInputEventTask node, TextInputStatistics statistics) {
+        String[] fragments = determineTextFragments(node.getEnteredText());
+
+        if (node.getEventTarget() instanceof ITextField) {
+            statistics.addTextFieldInput(node, fragments);
+        }
+        else if (node.getEventTarget() instanceof ITextArea) {
+            statistics.addTextAreaInput(node, fragments);
+        }
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param enteredText
      * @return
      */
-    //-----------------------------------------------------------------------------------------------
-    public int getNoOfAllInteractions()
-    {
-      return mTextFieldInputs.size() + mTextAreaInputs.size() + mOtherInteractionsCount;
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     *
+    private String[] determineTextFragments(String enteredText) {
+        List<String> fragments = new ArrayList<String>();
+
+        StringBuffer fragment = new StringBuffer();
+        char lastChar = 0;
+
+        for (int i = 0; i < enteredText.length(); i++) {
+            char currentChar = enteredText.charAt(i);
+
+            if (!isEqualCharacterType(lastChar, currentChar)) {
+                // the previous fragment ended. so finalize it and start a new one
+                if ((fragment != null) && (fragment.length() > 0)) {
+                    fragments.add(fragment.toString());
+                    fragment = new StringBuffer();
+                }
+            }
+
+            fragment.append(currentChar);
+            lastChar = currentChar;
+        }
+
+        if ((fragment != null) && (fragment.length() > 0)) {
+            fragments.add(fragment.toString());
+        }
+
+        return fragments.toArray(new String[fragments.size()]);
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param lastChar
+     * @param currentChar
      * @return
      */
-    //-----------------------------------------------------------------------------------------------
-    public int getNoOfTextFieldInputs()
-    {
-      return mTextFieldInputs.size();
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     *
-     * @param i
-     * @return
-     */
-    //-----------------------------------------------------------------------------------------------
-    public String[] getTextFieldInputFragments(int index)
-    {
-      return (String[]) mTextFieldInputs.get(index)[1];
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     *
-     * @return
-     */
-    //-----------------------------------------------------------------------------------------------
-    public int getNoOfTextAreaInputs()
-    {
-      return mTextAreaInputs.size();
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     *
-     * @param i
-     * @return
-     */
-    //-----------------------------------------------------------------------------------------------
-    public String[] getTextAreaInputFragments(int index)
-    {
-      return (String[]) mTextAreaInputs.get(index)[1];
-    }
-
-    //-----------------------------------------------------------------------------------------------
-    /**
-     * TODO: comment
-     *
-     */
-    //-----------------------------------------------------------------------------------------------
-    public void incrementNoOfOtherInteractionTasks()
-    {
-      mOtherInteractionsCount++;
-    }
-
-    
-  }
+    private boolean isEqualCharacterType(char char1, char char2) {
+        return
+            ((char1 == char2) ||
+            (Character.isWhitespace(char1) && Character.isWhitespace(char2)) ||
+            (Character.isDigit(char1) && Character.isDigit(char2)) ||
+            (Character.isLetter(char1) && Character.isLetter(char2)) ||
+            (Character.isJavaIdentifierPart(char1) && Character.isJavaIdentifierPart(char2)));
+    }
+
+    /**
+     * TODO comment
+     * 
+     * @version $Revision: $ $Date: 16.07.2012$
+     * @author 2012, last modified by $Author: pharms$
+     */
+    public static class TextInputStatistics {
+        
+        /** */
+        private List<Object[]> textFieldInputs = new ArrayList<Object[]>();
+
+        /** */
+        private List<Object[]> textAreaInputs = new ArrayList<Object[]>();
+
+        /** */
+        private int otherEventsCount;
+
+        /**
+         * TODO: comment
+         * 
+         * @param node
+         * @param fragments
+         * 
+         */
+        public void addTextFieldInput(ITextInputEventTask node, String[] fragments) {
+            textFieldInputs.add(new Object[] { node, fragments });
+        }
+
+        /**
+         * TODO: comment
+         * 
+         * @param node
+         * @param fragments
+         * 
+         */
+        public void addTextAreaInput(ITextInputEventTask node, String[] fragments) {
+            textAreaInputs.add(new Object[] { node, fragments });
+        }
+
+        /**
+         * TODO: comment
+         * 
+         * @return
+         */
+        public int getNoOfAllEvents() {
+            return textFieldInputs.size() + textAreaInputs.size() + otherEventsCount;
+        }
+
+        /**
+         * TODO: comment
+         * 
+         * @return
+         */
+        public int getNoOfTextFieldInputs() {
+            return textFieldInputs.size();
+        }
+
+        /**
+         * TODO: comment
+         * 
+         * @param i
+         * @return
+         */
+        public String[] getTextFieldInputFragments(int index) {
+            return (String[]) textFieldInputs.get(index)[1];
+        }
+
+        /**
+         * TODO: comment
+         * 
+         * @return
+         */
+        public int getNoOfTextAreaInputs() {
+            return textAreaInputs.size();
+        }
+
+        /**
+         * TODO: comment
+         * 
+         * @param i
+         * @return
+         */
+        public String[] getTextAreaInputFragments(int index) {
+            return (String[]) textAreaInputs.get(index)[1];
+        }
+
+        /**
+         * TODO: comment
+         * 
+         */
+        public void incrementNoOfOtherEventTasks() {
+            otherEventsCount++;
+        }
+
+    }
 
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefect.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefect.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefect.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityDefect.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
@@ -5,10 +4,10 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
 import java.util.Map;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -17,131 +16,109 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class UsabilityDefect
-{
+public class UsabilityDefect {
 
-  /** */
-  private UsabilityDefectSeverity mSeverity;
-  
-  /** */
-  private UsabilityDefectDescription mDescription;
+    /** */
+    private UsabilityDefectSeverity severity;
 
-  /** */
-  private Map<String, String> mDescriptionParameters;
+    /** */
+    private UsabilityDefectDescription description;
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param medium
-   * @param highTextInputRatio
-   */
-  //-----------------------------------------------------------------------------------------------
-  public UsabilityDefect(UsabilityDefectSeverity    severity,
-                         UsabilityDefectDescription description)
-  {
-    this(severity, description, null);
-  }
+    /** */
+    private Map<String, String> descriptionParameters;
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param medium
-   * @param highTextInputRatio
-   */
-  //-----------------------------------------------------------------------------------------------
-  public UsabilityDefect(UsabilityDefectSeverity    severity,
-                         UsabilityDefectDescription description,
-                         Map<String, String>        parameters)
-  {
-    mSeverity = severity;
-    mDescription = description;
-    mDescriptionParameters = parameters;
-  }
+    /**
+     * TODO: comment
+     * 
+     * @param medium
+     * @param highTextInputRatio
+     */
+    public UsabilityDefect(UsabilityDefectSeverity severity, UsabilityDefectDescription description)
+    {
+        this(severity, description, null);
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  public UsabilityDefectSeverity getSeverity()
-  {
-    return mSeverity;
-  }
+    /**
+     * TODO: comment
+     * 
+     * @param medium
+     * @param highTextInputRatio
+     */
+    public UsabilityDefect(UsabilityDefectSeverity    severity,
+                           UsabilityDefectDescription description,
+                           Map<String, String>        parameters)
+    {
+        this.severity = severity;
+        this.description = description;
+        this.descriptionParameters = parameters;
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * @param severity the severity to set
-   */
-  //-----------------------------------------------------------------------------------------------
-  public void setSeverity(UsabilityDefectSeverity severity)
-  {
-    mSeverity = severity;
-  }
+    /**
+     * TODO: comment
+     * 
+     * @return
+     */
+    public UsabilityDefectSeverity getSeverity() {
+        return severity;
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * @param description the description to set
-   */
-  //-----------------------------------------------------------------------------------------------
-  public void setDescription(UsabilityDefectDescription description)
-  {
-    mDescription = description;
-  }
+    /**
+     * @param severity
+     *            the severity to set
+     */
+    public void setSeverity(UsabilityDefectSeverity severity) {
+        this.severity = severity;
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
+    /**
+     * @param description
+     *            the description to set
+     */
+    public void setDescription(UsabilityDefectDescription description) {
+        this.description = description;
+    }
+
+    /**
    * 
    */
-  //-----------------------------------------------------------------------------------------------
-  public String getParameterizedDescription()
-  {
-    return mDescription.toString(mDescriptionParameters);
-  }
+    public String getParameterizedDescription() {
+        return description.toString(descriptionParameters);
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Object#equals(java.lang.Object)
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public boolean equals(Object obj)
-  {
-    if (obj instanceof UsabilityDefect)
-    {
-      return
-        (mSeverity == ((UsabilityDefect) obj).mSeverity) &&
-        (mDescription == ((UsabilityDefect) obj).mDescription);
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof UsabilityDefect) {
+            return
+                (severity == ((UsabilityDefect) obj).severity) &&
+                (description == ((UsabilityDefect) obj).description);
+        }
+        else {
+            return false;
+        }
     }
-    else
-    {
-      return false;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return severity.hashCode() + description.hashCode();
     }
-  }
 
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Object#hashCode()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public int hashCode()
-  {
-    return mSeverity.hashCode() + mDescription.hashCode();
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Object#toString()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public String toString()
-  {
-    return "UsabilityDefect(" + mSeverity.name() + ", " + mDescription.name() + ")";
-  }
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return "UsabilityDefect(" + severity.name() + ", " + description.name() + ")";
+    }
 
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectDescription.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectDescription.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectDescription.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityDefectDescriptions.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 18.07.2012 $
@@ -5,5 +4,5 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.usability;
 
@@ -18,5 +17,4 @@
 import javax.xml.bind.Unmarshaller;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -25,212 +23,175 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public enum UsabilityDefectDescription
-{
-  TEXT_FIELD_INPUT_RATIO,
-  TEXT_FIELD_INPUT_REPETITIONS,
-  TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO;
+public enum UsabilityDefectDescription {
+    
+    TEXT_FIELD_INPUT_RATIO,
+    TEXT_FIELD_INPUT_REPETITIONS,
+    TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO;
 
-  /** */
-  private static final String DEFAULT_MESSAGES_FILE = "defectDescriptions_en.xml";
-  
-  /** */
-  private static DefectDescriptions sDefectDescriptions;
+    /** */
+    private static final String DEFAULT_MESSAGES_FILE = "defectDescriptions_en.xml";
 
-  /** */
-  private DefectDescription mDefectDescription;
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param name
-   * @param ordinal
-   */
-  //-----------------------------------------------------------------------------------------------
-  private UsabilityDefectDescription()
-  {
-    init();
-  }
+    /** */
+    private static DefectDescriptions sDefectDescriptions;
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @SuppressWarnings("unchecked")
-  private void init()
-  {
-    synchronized (this.getClass())
-    {
-      if (sDefectDescriptions == null)
-      {
-        InputStream inputStream = ClassLoader.getSystemResourceAsStream(DEFAULT_MESSAGES_FILE);
+    /** */
+    private DefectDescription defectDescription;
 
-        try
-        {
-          String packageName = DefectDescriptions.class.getPackage().getName();
-          JAXBContext jaxbContext = JAXBContext.newInstance(packageName);
-          Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-        
-          sDefectDescriptions =
-            ((JAXBElement<DefectDescriptions>) unmarshaller.unmarshal(inputStream)).getValue();
+    /**
+     * TODO: comment
+     * 
+     * @param name
+     * @param ordinal
+     */
+    private UsabilityDefectDescription() {
+        init();
+    }
+
+    /**
+     * TODO: comment
+     * 
+     */
+    @SuppressWarnings("unchecked")
+    private void init() {
+        synchronized (this.getClass()) {
+            if (sDefectDescriptions == null) {
+                InputStream inputStream =
+                    ClassLoader.getSystemResourceAsStream(DEFAULT_MESSAGES_FILE);
+
+                try {
+                    String packageName = DefectDescriptions.class.getPackage().getName();
+                    JAXBContext jaxbContext = JAXBContext.newInstance(packageName);
+                    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+                    sDefectDescriptions =
+                        ((JAXBElement<DefectDescriptions>) unmarshaller.unmarshal(inputStream))
+                            .getValue();
+                }
+                catch (Exception e) {
+                    throw new RuntimeException
+                        ("error while initializing usability defect descriptions", e);
+                }
+                finally {
+                    if (inputStream != null) {
+                        try {
+                            inputStream.close();
+                        }
+                        catch (IOException e) {
+                            // ignore
+                        }
+                    }
+                }
+            }
         }
-        catch (Exception e)
-        {
-          throw new RuntimeException("error while initializing usability defect descriptions", e);
+
+        for (DefectDescription description : sDefectDescriptions.getDefectDescription()) {
+            if (this.name().equals(description.getDefectId())) {
+                defectDescription = description;
+                break;
+            }
         }
-        finally
-        {
-          if (inputStream != null)
-          {
-            try
-            {
-              inputStream.close();
-            }
-            catch (IOException e)
-            {
-              // ignore
-            }
-          }
+
+        if (defectDescription == null) {
+            throw new RuntimeException
+                ("error while initializing usability defect descriptions. No " +
+                 "description text available for description " + this.name());
         }
-      }
     }
-    
-    for (DefectDescription description : sDefectDescriptions.getDefectDescription())
-    {
-      if (this.name().equals(description.getDefectId()))
-      {
-        mDefectDescription = description;
-        break;
-      }
-    }
-    
-    if (mDefectDescription == null)
-    {
-      throw new RuntimeException("error while initializing usability defect descriptions. No " +
-                                 "description text available for description " + this.name());
-    }
-  }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
+    /**
    * 
    */
-  //-----------------------------------------------------------------------------------------------
-  public String[] getDescriptionParameters()
-  {
-    List<String> parameters = new ArrayList<String>();
-    
-    for (Object fragment : mDefectDescription.getTextFragmentOrParameterFragment())
-    {
-      if (fragment instanceof ParameterFragment)
-      {
-        parameters.add(((ParameterFragment) fragment).getParameterName());
-      }
+    public String[] getDescriptionParameters() {
+        List<String> parameters = new ArrayList<String>();
+
+        for (Object fragment : defectDescription.getTextFragmentOrParameterFragment()) {
+            if (fragment instanceof ParameterFragment) {
+                parameters.add(((ParameterFragment) fragment).getParameterName());
+            }
+        }
+
+        return parameters.toArray(new String[parameters.size()]);
     }
-    
-    return parameters.toArray(new String[parameters.size()]);
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
+
+    /**
    * 
    */
-  //-----------------------------------------------------------------------------------------------
-  public String toString(Map<String, String> parameters) throws IllegalArgumentException
-  {
-    StringBuffer result = new StringBuffer();
-    
-    for (Object fragment : mDefectDescription.getTextFragmentOrParameterFragment())
-    {
-      if (result.length() > 0)
-      {
-        result.append(" ");
-      }
-      
-      if (fragment instanceof ParameterFragment)
-      {
-        String value = null;
-        if (parameters != null)
-        {
-          value = parameters.get(((ParameterFragment) fragment).getParameterName());
+    public String toString(Map<String, String> parameters) throws IllegalArgumentException {
+        StringBuffer result = new StringBuffer();
+
+        for (Object fragment : defectDescription.getTextFragmentOrParameterFragment()) {
+            if (result.length() > 0) {
+                result.append(" ");
+            }
+
+            if (fragment instanceof ParameterFragment) {
+                String value = null;
+                if (parameters != null) {
+                    value = parameters.get(((ParameterFragment) fragment).getParameterName());
+                }
+
+                if (value != null) {
+                    result.append(value);
+                }
+                else {
+                    throw new IllegalArgumentException
+                        ("required parameter \"" +
+                         ((ParameterFragment) fragment).getParameterName() +
+                         "\" for usability defect description " + this.name() + " not provided");
+                }
+            }
+            else {
+                result.append(getFragmentString(fragment));
+            }
         }
-        
-        if (value != null)
-        {
-          result.append(value);
+
+        return result.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Enum#toString()
+     */
+    @Override
+    public String toString() {
+        StringBuffer result = new StringBuffer();
+
+        int paramCount = 1;
+        for (Object fragment : defectDescription.getTextFragmentOrParameterFragment()) {
+            if (result.length() > 0) {
+                result.append(" ");
+            }
+
+            if (fragment instanceof ParameterFragment) {
+                result.append("<parameter");
+                result.append(paramCount++);
+                result.append(">");
+            }
+            else {
+                result.append(getFragmentString(fragment));
+            }
         }
-        else
-        {
-          throw new IllegalArgumentException
-            ("required parameter \"" + ((ParameterFragment) fragment).getParameterName() +
-             "\" for usability defect description " + this.name() + " not provided");
+
+        return result.toString();
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param fragment
+     * @return
+     */
+    private String getFragmentString(Object fragment) {
+        String fragmentStr = fragment.toString().trim();
+
+        fragmentStr = fragmentStr.replaceAll("\n", " ");
+
+        while (fragmentStr.indexOf("  ") > -1) {
+            fragmentStr = fragmentStr.replaceAll("  ", " ");
         }
-      }
-      else
-      {
-        result.append(getFragmentString(fragment));
-      }
+
+        return fragmentStr;
     }
-    
-    return result.toString();
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Enum#toString()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public String toString()
-  {
-    StringBuffer result = new StringBuffer();
-    
-    int paramCount = 1;
-    for (Object fragment : mDefectDescription.getTextFragmentOrParameterFragment())
-    {
-      if (result.length() > 0)
-      {
-        result.append(" ");
-      }
-      
-      if (fragment instanceof ParameterFragment)
-      {
-        result.append("<parameter");
-        result.append(paramCount++);
-        result.append(">");
-      }
-      else
-      {
-        result.append(getFragmentString(fragment));
-      }
-    }
-    
-    return result.toString();
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param fragment
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private String getFragmentString(Object fragment)
-  {
-    String fragmentStr = fragment.toString().trim();
-    
-    fragmentStr = fragmentStr.replaceAll("\n", " ");
-    
-    while (fragmentStr.indexOf("  ") > -1)
-    {
-      fragmentStr = fragmentStr.replaceAll("  ", " ");
-    }
-    
-    return fragmentStr;
-  }
 
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectSeverity.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectSeverity.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectSeverity.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityDefectSeverity.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
@@ -5,8 +4,8 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -15,10 +14,7 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public enum UsabilityDefectSeverity
-{
-  INFO,
-  LOW,
-  MEDIUM,
-  HIGH;
+public enum UsabilityDefectSeverity {
+    
+    INFO, LOW, MEDIUM, HIGH;
+
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationManager.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationManager.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationManager.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityEvaluationManager.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
@@ -5,5 +4,5 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.usability;
 
@@ -12,7 +11,6 @@
 import java.util.logging.Logger;
 
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTree;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -21,86 +19,70 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class UsabilityEvaluationManager
-{
-  /** */
-  private static Logger LOG = Logger.getLogger(UsabilityEvaluationManager.class.getName());
+public class UsabilityEvaluationManager {
+    
+    /** */
+    private static Logger LOG = Logger.getLogger(UsabilityEvaluationManager.class.getName());
 
-  /** */
-  private List<UsabilityEvaluationRule> mRules = new ArrayList<UsabilityEvaluationRule>();
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  public UsabilityEvaluationManager()
-  {
-    super();
-    init();
-  }
+    /** */
+    private List<UsabilityEvaluationRule> rules = new ArrayList<UsabilityEvaluationRule>();
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  private void init()
-  {
-    mRules.add(new TextInputStatisticsRule());
-  }
+    /**
+     * TODO: comment
+     * 
+     */
+    public UsabilityEvaluationManager() {
+        super();
+        init();
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param taskTree
-   */
-  //-----------------------------------------------------------------------------------------------
-  public UsabilityEvaluationResult evaluateUsability(TaskTree taskTree)
-  {
-    LOG.info("evaluating usability of task tree " + taskTree);
-    
-    List<UsabilityEvaluationResult> results = new ArrayList<UsabilityEvaluationResult>();
-    
-    for (UsabilityEvaluationRule rule : mRules)
-    {
-      LOG.info("applying rule " + rule.getClass().getSimpleName());
-      UsabilityEvaluationResult result = rule.evaluate(taskTree);
-      results.add(result);
-      LOG.info("the rule found " + result.getAllDefects().size() + " usability defects, of " +
-                "which " + result.getSevereDefects().size() + " are severe.");
+    /**
+     * TODO: comment
+     * 
+     */
+    private void init() {
+        rules.add(new TextInputStatisticsRule());
     }
-    
-    UsabilityEvaluationResult result = mergeResults(results);
-    LOG.info("the evaluation result contains " + result.getAllDefects().size() + " defects, of " +
-             "which " + result.getSevereDefects().size() + " are severe.");
-    return result;
-  }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param results
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private UsabilityEvaluationResult mergeResults(List<UsabilityEvaluationResult> results)
-  {
-    UsabilityEvaluationResult result = new UsabilityEvaluationResult();
-    
-    for (UsabilityEvaluationResult ruleResult : results)
-    {
-      for (UsabilityDefect defect : ruleResult.getAllDefects())
-      {
-        result.addDefect(defect);
-      }
+    /**
+     * TODO: comment
+     * 
+     * @param taskTree
+     */
+    public UsabilityEvaluationResult evaluateUsability(ITaskTree taskTree) {
+        LOG.info("evaluating usability of task tree " + taskTree);
+
+        List<UsabilityEvaluationResult> results = new ArrayList<UsabilityEvaluationResult>();
+
+        for (UsabilityEvaluationRule rule : rules) {
+            LOG.info("applying rule " + rule.getClass().getSimpleName());
+            UsabilityEvaluationResult result = rule.evaluate(taskTree);
+            results.add(result);
+            LOG.info("the rule found " + result.getAllDefects().size() + " usability defects, of " +
+                     "which " + result.getSevereDefects().size() + " are severe.");
+        }
+
+        UsabilityEvaluationResult result = mergeResults(results);
+        LOG.info("the evaluation result contains " + result.getAllDefects().size() +
+                 " defects, of which " + result.getSevereDefects().size() + " are severe.");
+        return result;
     }
-    
-    return result;
-  }
-  
+
+    /**
+     * TODO: comment
+     * 
+     * @param results
+     * @return
+     */
+    private UsabilityEvaluationResult mergeResults(List<UsabilityEvaluationResult> results) {
+        UsabilityEvaluationResult result = new UsabilityEvaluationResult();
+
+        for (UsabilityEvaluationResult ruleResult : results) {
+            for (UsabilityDefect defect : ruleResult.getAllDefects()) {
+                result.addDefect(defect);
+            }
+        }
+
+        return result;
+    }
+
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationResult.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationResult.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationResult.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityEvaluationResult.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
@@ -5,5 +4,6 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
@@ -11,5 +11,4 @@
 import java.util.List;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -18,55 +17,43 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public class UsabilityEvaluationResult
-{
-  /** */
-  private List<UsabilityDefect> mDefects = new ArrayList<UsabilityDefect>();
+public class UsabilityEvaluationResult {
+    
+    /** */
+    private List<UsabilityDefect> defects = new ArrayList<UsabilityDefect>();
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param defect
-   */
-  //-----------------------------------------------------------------------------------------------
-  public void addDefect(UsabilityDefect defect)
-  {
-    mDefects.add(defect);
-  }
+    /**
+     * TODO: comment
+     * 
+     * @param defect
+     */
+    public void addDefect(UsabilityDefect defect) {
+        defects.add(defect);
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  public List<UsabilityDefect> getAllDefects()
-  {
-    return mDefects;
-  }
+    /**
+     * TODO: comment
+     * 
+     * @return
+     */
+    public List<UsabilityDefect> getAllDefects() {
+        return defects;
+    }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  public List<UsabilityDefect> getSevereDefects()
-  {
-    List<UsabilityDefect> severeDefects = new ArrayList<UsabilityDefect>();
-    
-    for (UsabilityDefect defect : mDefects)
-    {
-      if (defect.getSeverity() == UsabilityDefectSeverity.HIGH)
-      {
-        severeDefects.add(defect);
-      }
+    /**
+     * TODO: comment
+     * 
+     * @return
+     */
+    public List<UsabilityDefect> getSevereDefects() {
+        List<UsabilityDefect> severeDefects = new ArrayList<UsabilityDefect>();
+
+        for (UsabilityDefect defect : defects) {
+            if (defect.getSeverity() == UsabilityDefectSeverity.HIGH) {
+                severeDefects.add(defect);
+            }
+        }
+
+        return severeDefects;
     }
-    
-    return severeDefects;
-  }
 
 }
Index: /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationRule.java
===================================================================
--- /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationRule.java	(revision 560)
+++ /trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityEvaluationRule.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityEvaluationRule.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 16.07.2012 $
@@ -5,10 +4,10 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
+
 package de.ugoe.cs.quest.usability;
 
-import de.ugoe.cs.quest.tasktrees.treeifc.TaskTree;
+import de.ugoe.cs.quest.tasktrees.treeifc.ITaskTree;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -17,17 +16,13 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public interface UsabilityEvaluationRule
-{
+public interface UsabilityEvaluationRule {
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param taskTree
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  UsabilityEvaluationResult evaluate(TaskTree taskTree);
+    /**
+     * TODO: comment
+     * 
+     * @param taskTree
+     * @return
+     */
+    UsabilityEvaluationResult evaluate(ITaskTree taskTree);
 
 }
