Index: /trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java
===================================================================
--- /trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java	(revision 416)
+++ /trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java	(revision 417)
@@ -23,18 +23,51 @@
  */
 public class JFCTargetComparator {
-	
+
+	/**
+	 * <p>
+	 * If mutable is true, new target strings can be added to the internal
+	 * memory. This leads to a very expensive {@link #compare(String, String)}
+	 * operation.
+	 * </p>
+	 * <p>
+	 * if mutable is set to false, currently possible equal targets are
+	 * pre-computed. This pre-computation is expensive and might take a while.
+	 * In turn, the {@link #compare(String, String)} operation becomes very
+	 * cheap.
+	 * </p>
+	 */
 	private static boolean mutable = true;
-	
+
+	/**
+	 * <p>
+	 * Set of all currently known targets.
+	 * </p>
+	 */
 	private static Set<String> knownTargets = new LinkedHashSet<String>();
-	
+
+	/**
+	 * <p>
+	 * Map that contains for all known target strings all equal target strings.
+	 * Pre-computed when {@link #mutable} is set to false.
+	 * </p>
+	 */
 	private static Map<String, Set<String>> equalTargets;
-	
+
+	/**
+	 * <p>
+	 * Changes the mutability of the comparator. If the mutability is changed
+	 * from true to false, the map {@link #equalTargets} is computed.
+	 * </p>
+	 * 
+	 * @param mutable
+	 *            new mutability of the comparator
+	 */
 	public static void setMutable(boolean mutable) {
-		if( JFCTargetComparator.mutable==true && mutable == false ) {
+		if (JFCTargetComparator.mutable == true && mutable == false) {
 			equalTargets = new HashMap<String, Set<String>>();
-			for( String target1 : knownTargets ) {
+			for (String target1 : knownTargets) {
 				Set<String> curEqualTargets = new HashSet<String>();
-				for( String target2 : knownTargets ) {
-					if( compare(target1, target2) ) {
+				for (String target2 : knownTargets) {
+					if (compare(target1, target2)) {
 						curEqualTargets.add(target2);
 					}
@@ -69,5 +102,5 @@
 	public static boolean compare(String target1, String target2) {
 		boolean result = false;
-		if( mutable ) {
+		if (mutable) {
 			instance.addTarget(target1);
 			instance.addTarget(target2);
@@ -76,15 +109,14 @@
 			JFCWidget widget1 = instance.find(target1);
 			JFCWidget widget2 = instance.find(target2);
-			result = (widget1==widget2);
-		}
-		
-		
-		if( !mutable ) {
+			result = (widget1 == widget2);
+		}
+
+		if (!mutable) {
 			Set<String> curEquals = equalTargets.get(target1);
-			if( curEquals!=null ) {
+			if (curEquals != null) {
 				result = curEquals.contains(target2);
-			}			
-		}
-		
+			}
+		}
+
 		return result;
 	}
@@ -227,4 +259,5 @@
 	 * the known GUI hierarchy, by traversing the known widgets starting with
 	 * the {@link #rootWidgets}.
+	 * </p>
 	 * 
 	 * @param target
@@ -327,6 +360,11 @@
 		 */
 		String text;
-		
-		int hashCode=0;
+
+		/**
+		 * <p>
+		 * Pre-computed hash code of the widget.
+		 * </p>
+		 */
+		int hashCode = 0;
 
 		/**
@@ -351,9 +389,11 @@
 			if (obj instanceof JFCWidget) {
 				JFCWidget other = (JFCWidget) obj;
-				boolean titleEqual = CollectionUtils.containsAny(titles, other.titles);
-				boolean hashEqual = CollectionUtils.containsAny(hashCodes, other.hashCodes);
+				boolean titleEqual = CollectionUtils.containsAny(titles,
+						other.titles);
+				boolean hashEqual = CollectionUtils.containsAny(hashCodes,
+						other.hashCodes);
 
 				boolean retVal;
-				
+
 				if (widgetClass.equals("Class")) {
 					retVal = (widgetClass.equals(other.widgetClass)
@@ -376,5 +416,5 @@
 		@Override
 		public int hashCode() {
-			if( hashCode==0 ) {
+			if (hashCode == 0) {
 				int multiplier = 7;
 				hashCode = multiplier * hashCode + widgetClass.hashCode();
