Index: trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/GUIEventTaskComparisonRule.java
===================================================================
--- trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/GUIEventTaskComparisonRule.java	(revision 1057)
+++ trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/nodeequality/GUIEventTaskComparisonRule.java	(revision 1061)
@@ -1,4 +1,5 @@
 package de.ugoe.cs.autoquest.tasktrees.nodeequality;
 
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
 import de.ugoe.cs.autoquest.eventcore.gui.IInteraction;
 import de.ugoe.cs.autoquest.eventcore.gui.MouseClick;
@@ -7,4 +8,14 @@
 import de.ugoe.cs.autoquest.eventcore.gui.TextInput;
 import de.ugoe.cs.autoquest.eventcore.gui.ValueSelection;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IButton;
+import de.ugoe.cs.autoquest.eventcore.guimodel.ICheckBox;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IComboBox;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IImage;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IListBox;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IMenuButton;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IRadioButton;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IShape;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IText;
+import de.ugoe.cs.autoquest.eventcore.guimodel.IToolTip;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode;
@@ -57,22 +68,29 @@
         IInteraction interaction2 = (IInteraction) task2.getEventType();
         
-        return compareInteractions(interaction1, interaction2);
-    }
-
-    /**
-     * <p>
-     * compares two interactions. The method delegates two
+        return compareInteractions(interaction1, interaction2, task1.getEventTarget());
+    }
+
+    /**
+     * <p>
+     * compares two interactions. The method delegates to other, more specific compare method, e.g.,
      * {@link #compareTextInputs(TextInput, TextInput)} and
-     * {@link #compareValueSelections(ValueSelection, ValueSelection)} for text inputs and value
-     * selections. Otherwise it uses the equal method of the interactions for comparison. In this
-     * case, if the interactions equal method returns true, this method returns lexical equality.
+     * {@link #compareValueSelections(ValueSelection, ValueSelection)}, if any exist for the
+     * concrete interaction types. Otherwise it uses the equals method of the interactions for
+     * comparison. In this case, if the interactions equals method returns true, this method
+     * returns lexical equality.
      * </p>
      *
      * @param interaction1 the first interaction to compare
      * @param interaction2 the second interaction to compare
-     * 
-     * @return as described
-     */
-    private NodeEquality compareInteractions(IInteraction interaction1, IInteraction interaction2) {
+     * @param eventTarget  the event target on which the interactions happened (used within
+     *                     special comparisons like mouse clicks on buttons, where the coordinates
+     *                     can be ignored)
+     * 
+     * @return as described
+     */
+    private NodeEquality compareInteractions(IInteraction interaction1,
+                                             IInteraction interaction2,
+                                             IEventTarget eventTarget)
+    {
         if (interaction1 == interaction2) {
             return NodeEquality.LEXICALLY_EQUAL;
@@ -90,5 +108,6 @@
                  (interaction2 instanceof MouseClick))
         {
-            return compareMouseClicks((MouseClick) interaction1, (MouseClick) interaction2);
+            return compareMouseClicks
+                ((MouseClick) interaction1, (MouseClick) interaction2, eventTarget);
         }
         else if ((interaction1 instanceof MouseDoubleClick) &&
@@ -96,5 +115,5 @@
         {
             return compareMouseDoubleClicks
-                ((MouseDoubleClick) interaction1, (MouseDoubleClick) interaction2);
+                ((MouseDoubleClick) interaction1, (MouseDoubleClick) interaction2, eventTarget);
         }
         else if ((interaction1 instanceof MouseDragAndDrop) &&
@@ -168,17 +187,27 @@
      * <p>
      * compares two mouse clicks. If both clicks have the same coordinates, they are lexically
-     * equal. Otherwise, they are semantically equal.
+     * equal. Otherwise, they are semantically equal. Mouse clicks for which the coordinates make
+     * no lexical difference (see {@link #clickCoordinatesMakeLexicalDifference(IEventTarget)})
+     * are treated as lexically equal.
      * </p>
      *
      * @param interaction1 the first mouse click to compare
      * @param interaction2 the second mouse click to compare
-     * 
-     * @return as described
-     */
-    private NodeEquality compareMouseClicks(MouseClick interaction1,
-                                            MouseClick interaction2)
+     * @param eventTarget  the event target on which the interactions happened (used within
+     *                     special comparisons like mouse clicks on buttons, where the coordinates
+     *                     can be ignored)
+     * 
+     * @return as described
+     */
+    private NodeEquality compareMouseClicks(MouseClick   interaction1,
+                                            MouseClick   interaction2,
+                                            IEventTarget eventTarget)
     {
         if (interaction1.getButton() != interaction2.getButton()) {
             return NodeEquality.UNEQUAL;
+        }
+        
+        if (!clickCoordinatesMakeLexicalDifference(eventTarget)) {
+            return NodeEquality.LEXICALLY_EQUAL;
         }
         
@@ -199,17 +228,28 @@
      * <p>
      * compares two mouse double clicks. If both double clicks have the same coordinates, they are
-     * lexically equal. Otherwise, they are semantically equal.
+     * lexically equal. Otherwise, they are semantically equal. Double clicks for which the
+     * coordinates make no lexical difference
+     * (see {@link #clickCoordinatesMakeLexicalDifference(IEventTarget)}) are treated as lexically
+     * equal.
      * </p>
      *
      * @param interaction1 the first mouse double click to compare
      * @param interaction2 the second mouse double click to compare
+     * @param eventTarget  the event target on which the interactions happened (used within
+     *                     special comparisons like mouse clicks on buttons, where the coordinates
+     *                     can be ignored)
      * 
      * @return as described
      */
     private NodeEquality compareMouseDoubleClicks(MouseDoubleClick interaction1,
-                                                  MouseDoubleClick interaction2)
+                                                  MouseDoubleClick interaction2,
+                                                  IEventTarget     eventTarget)
     {
         if (interaction1.getButton() != interaction2.getButton()) {
             return NodeEquality.UNEQUAL;
+        }
+        
+        if (!clickCoordinatesMakeLexicalDifference(eventTarget)) {
+            return NodeEquality.LEXICALLY_EQUAL;
         }
         
@@ -262,3 +302,36 @@
     }
 
+    /**
+     * <p>
+     * Checks, if the coordinates of a click or double click on the provided event target makes
+     * a lexical difference. Mouse clicks and double clicks on buttons, check boxes,
+     * combo boxes, images, list boxes, menu buttons, radio buttons, shapes, uneditable text,
+     * and tool tips have no lexical difference as long as they happen on the same event target.
+     * The concrete coordinates are not relevant.
+     * </p>
+     *
+     * @param eventTarget the event target on which the interaction occurred
+     * 
+     * @return if the coordinates are important to be considered for clicks and double clicks,
+     *         false else
+     */
+    private boolean clickCoordinatesMakeLexicalDifference(IEventTarget eventTarget) {
+        if ((eventTarget instanceof IButton) ||
+            (eventTarget instanceof ICheckBox) ||
+            (eventTarget instanceof IComboBox) ||
+            (eventTarget instanceof IImage) ||
+            (eventTarget instanceof IListBox) ||
+            (eventTarget instanceof IMenuButton) ||
+            (eventTarget instanceof IRadioButton) ||
+            (eventTarget instanceof IShape) ||
+            (eventTarget instanceof IText) ||
+            (eventTarget instanceof IToolTip))
+        {
+            return false;
+        }
+        else {
+            return true;
+        }
+    }
+
 }
