Index: trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElementSpec.java
===================================================================
--- trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElementSpec.java	(revision 2215)
+++ trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElementSpec.java	(revision 2231)
@@ -135,9 +135,9 @@
         /*
          * Path and label of the elements fits together. In this case it is most likely that this
-         * elements fits together. This only makes since in the case a label exists.
-         */
-        if (otherSpec.getName() != "NOT_SET" && getName() != "NOT_SET" &&
-            !otherSpec.getName().contains("image:") && getName().contains("image:") &&
-            otherSpec.getName() == getName() && otherSpec.getPath() == getPath())
+         * elements fits together. This only makes sense in the case a label exists.
+         */
+        if (!"NOT_SET".equals(otherSpec.getName()) && !"NOT_SET".equals(getName()) &&
+            !otherSpec.getName().contains("image:") && !getName().contains("image:") &&
+            otherSpec.getName().equals(getName()) && otherSpec.getPath().equals(getPath()))
         {
             return true;
@@ -148,5 +148,5 @@
          * together.
          */
-        if (otherSpec.getPath() == getPath() &&
+        if (otherSpec.getPath().equals(getPath()) &&
             otherSpec.getElementPosition() == getElementPosition())
         {
