Index: /trunk/autoquest-plugin-jfc-test/src/test/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParserTest.java
===================================================================
--- /trunk/autoquest-plugin-jfc-test/src/test/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParserTest.java	(revision 1026)
+++ /trunk/autoquest-plugin-jfc-test/src/test/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParserTest.java	(revision 1027)
@@ -15,5 +15,4 @@
 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel;
 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement;
-import de.ugoe.cs.autoquest.plugin.jfc.JFCLogParser;
 import de.ugoe.cs.autoquest.plugin.jfc.guimodel.JFCGUIElement;
 import de.ugoe.cs.util.console.TextConsole;
@@ -41,5 +40,5 @@
     public void test() throws Exception {
         JFCSimplifiedLogParser parser = new JFCSimplifiedLogParser(null);
-        parser.parseFile(new File(ClassLoader.getSystemResource("newtrace.xml").getFile()));
+        parser.parseFile(new File(ClassLoader.getSystemResource("newtrace2.log").getFile()));
         Collection<List<Event>> events = parser.getSequences();
 
Index: /trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParser.java
===================================================================
--- /trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParser.java	(revision 1026)
+++ /trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/JFCSimplifiedLogParser.java	(revision 1027)
@@ -15,6 +15,4 @@
 import java.util.Map;
 import java.util.logging.Level;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import javax.xml.parsers.ParserConfigurationException;
@@ -71,5 +69,5 @@
      */
     private JFCEventId currentEventId;
-    
+
     /**
      * 
@@ -79,5 +77,5 @@
      */
     private Long currentGUIElementHash;
-    
+
     /**
      * 
@@ -87,5 +85,5 @@
      */
     private Long currentParentHash;
-    
+
     /**
      * <p>
@@ -94,5 +92,5 @@
      */
     private Long currentEventSource;
-    
+
     /**
      * <p>
@@ -100,5 +98,5 @@
      */
     private Long currentEventTimestamp = -1l;
-     
+
     /**
      * <p>
@@ -114,5 +112,5 @@
      */
     private List<Event> currentSequence;
-   
+
     /**
      * <p>
@@ -127,5 +125,5 @@
      * </p>
      */
-    private GUIElementTree currentGUIElementTree;
+    private GUIElementTree<Long> currentGUIElementTree;
 
     /**
@@ -136,5 +134,5 @@
      */
     private IGUIElement lastGUIElement;
-    
+
     /**
      * <p>
@@ -150,5 +148,5 @@
      */
     private List<VirtualKey> mPressedKeys = new ArrayList<VirtualKey>();
-    
+
     /**
      * <p>
@@ -225,5 +223,5 @@
             saxParser = spf.newSAXParser();
             inputSource =
-                new InputSource(new InputStreamReader(new FileInputStream(file), "UTF-8"));
+                    new InputSource(new InputStreamReader(new FileInputStream(file), "UTF-8"));
         }
         catch (UnsupportedEncodingException e) {
@@ -257,5 +255,5 @@
             catch (SAXParseException e) {
                 Console.printerrln("Failure parsing file in line " + e.getLineNumber() +
-                    ", column " + e.getColumnNumber() + ".");
+                                   ", column " + e.getColumnNumber() + ".");
                 Console.logException(e);
                 return;
@@ -303,9 +301,9 @@
      */
     public void startElement(String uri, String localName, String qName, Attributes atts)
-        throws SAXException{
+            throws SAXException{
         if (qName.equals("sessions")) {
             currentSequence = new LinkedList<Event>();
             if (currentGUIElementTree == null)
-            	currentGUIElementTree = new GUIElementTree();
+                currentGUIElementTree = new GUIElementTree<Long>();
         }
         if (qName.equals("newsession")) {
@@ -318,7 +316,7 @@
         }
         else if (qName.equals("component")) {
-        	currentGUIElementHash = Long.parseLong(atts.getValue("hash"), 16);
-        	currentGuiElementSpec = new JFCGUIElementSpec();
-        	currentGuiElementSpec.setElementHash((int) currentGUIElementHash.longValue());
+            currentGUIElementHash = Long.parseLong(atts.getValue("hash"), 16);
+            currentGuiElementSpec = new JFCGUIElementSpec();
+            currentGuiElementSpec.setElementHash((int) currentGUIElementHash.longValue());
         }
         else if (qName.equals("event")) {
@@ -330,43 +328,43 @@
         }
         else if (qName.equals("componentNameChange")) {
-        	int sourceHash = (int) Long.parseLong(atts.getValue("hash"), 16);
-        	String newName = atts.getValue("newName");
-        	int titleSource = Integer.parseInt(atts.getValue("titleSource"));
-        	JFCGUIElement sourceElement = (JFCGUIElement) currentGUIElementTree.find(sourceHash);
-        	JFCGUIElementSpec sourceSpec = (JFCGUIElementSpec) sourceElement.getSpecification();
-        	sourceSpec.setName(newName);
+            long sourceHash = Long.parseLong(atts.getValue("hash"), 16);
+            String newName = atts.getValue("newName");
+            // int titleSource = Integer.parseInt(atts.getValue("titleSource"));
+            JFCGUIElement sourceElement = (JFCGUIElement) currentGUIElementTree.find(sourceHash);
+            JFCGUIElementSpec sourceSpec = (JFCGUIElementSpec) sourceElement.getSpecification();
+            sourceSpec.setName(newName);
         }
         else if (qName.equals("param")) {
-        	if (currentEventId != null){
-        		if ("source".equals(atts.getValue("name"))){
-        			currentEventSource = Long.parseLong(atts.getValue("value"), 16);
-        		}
-        		if ("timestamp".equals(atts.getValue("name"))){
-        			currentEventTimestamp = Long.parseLong(atts.getValue("value"));
-        		}
+            if (currentEventId != null){
+                if ("source".equals(atts.getValue("name"))){
+                    currentEventSource = Long.parseLong(atts.getValue("value"), 16);
+                }
+                if ("timestamp".equals(atts.getValue("name"))){
+                    currentEventTimestamp = Long.parseLong(atts.getValue("value"));
+                }
                 currentEventParameters.put(atts.getValue("name"), atts.getValue("value"));
             } else if(currentGUIElementHash != null){
-            	if ("title".equals(atts.getValue("name"))) {
-        			currentGuiElementSpec.setName(atts.getValue("value"));
-        		}
-        		else if ("class".equals(atts.getValue("name"))) {
-        			currentGuiElementSpec.setType(atts.getValue("value"));
-        		}
-        		else if ("icon".equals(atts.getValue("name"))) {
-        			currentGuiElementSpec.setIcon(atts.getValue("value"));
-        		}
-        		else if ("index".equals(atts.getValue("name"))) {
-        			currentGuiElementSpec.setIndex(Integer.parseInt(atts.getValue("value")));
-        		}
-        		else if ("parent".equals(atts.getValue("name"))) {
-        			currentParentHash = Long.parseLong(atts.getValue("value"), 16);
-        		}
+                if ("title".equals(atts.getValue("name"))) {
+                    currentGuiElementSpec.setName(atts.getValue("value"));
+                }
+                else if ("class".equals(atts.getValue("name"))) {
+                    currentGuiElementSpec.setType(atts.getValue("value"));
+                }
+                else if ("icon".equals(atts.getValue("name"))) {
+                    currentGuiElementSpec.setIcon(atts.getValue("value"));
+                }
+                else if ("index".equals(atts.getValue("name"))) {
+                    currentGuiElementSpec.setIndex(Integer.parseInt(atts.getValue("value")));
+                }
+                else if ("parent".equals(atts.getValue("name"))) {
+                    currentParentHash = Long.parseLong(atts.getValue("value"), 16);
+                }
             }
         }
         else if (qName.equals("ancestor")){
-        		currentTypeHierarchy.add(atts.getValue("name"));
+            currentTypeHierarchy.add(atts.getValue("name"));
         }
         else if (qName.equals("ancestors")){
-        		currentTypeHierarchy = new LinkedList<String>();
+            currentTypeHierarchy = new LinkedList<String>();
         }
     }
@@ -387,37 +385,36 @@
         }
         else if (qName.equals("ancestors")){
-        	currentGuiElementSpec.setTypeHierarchy(currentTypeHierarchy);
+            currentGuiElementSpec.setTypeHierarchy(currentTypeHierarchy);
         }
         else if (qName.equals("component") && currentGUIElementHash != null) {
-        	currentGUIElementTree.add(currentGUIElementHash, currentParentHash, currentGuiElementSpec);
-        	// do something with the ancestor list here
-        	
-        	currentGUIElementHash = null;
-        	currentParentHash = null;
-        	currentTypeHierarchy = null;
+            currentGUIElementTree.add(currentGUIElementHash, currentParentHash, currentGuiElementSpec);
+
+            currentGUIElementHash = null;
+            currentParentHash = null;
+            currentTypeHierarchy = null;
         }
         else if (currentEventId != null) {
             if (qName.equals("event")) {
-                
+
                 IGUIElement currentGUIElement;
                 currentGUIElement = currentGUIElementTree.find(currentEventSource);
-                
+
                 Event event = new Event
-                    (instantiateInteraction(currentEventId, currentEventParameters),
-                     (currentGUIElement == null ? lastGUIElement : currentGUIElement));
+                        (instantiateInteraction(currentEventId, currentEventParameters),
+                         (currentGUIElement == null ? lastGUIElement : currentGUIElement));
                 event.setTimestamp(currentEventTimestamp);
                 JFCGUIElement currentEventTarget = (JFCGUIElement) event.getTarget();
                 currentEventTarget.markAsUsed();
-                
+
                 currentSequence.add(event);
-                
+
                 currentEventParameters = null;
                 currentEventId = null;
                 currentEventTimestamp = -1l;
-                
+
                 if (currentGUIElement != null) {
                     lastGUIElement = currentGUIElement;
                 }
-                
+
                 currentGUIElement = null;
             }
@@ -442,6 +439,6 @@
     private IInteraction instantiateInteraction(JFCEventId          eventId,
                                                 Map<String, String> eventParameters)
-      throws SAXException
-    {
+                                                        throws SAXException
+                                                        {
         switch (eventId)
         {
@@ -467,5 +464,5 @@
                 throw new SAXException("unhandled event id " + eventId);
         }
-    }
+                                                        }
 
     /**
@@ -485,6 +482,6 @@
      */
     private IInteraction handleMouseAction(JFCEventId eventId, Map<String, String> eventParameters)
-        throws SAXException
-    {
+            throws SAXException
+            {
         MouseButtonInteraction.Button button = null;
 
@@ -532,5 +529,5 @@
             throw new SAXException("unknown event id " + eventId);
         }
-    }
+            }
 
     /**
@@ -552,6 +549,6 @@
      */
     private IInteraction handleKeyAction(JFCEventId eventId, Map<String, String> eventParameters)
-      throws SAXException
-    {
+            throws SAXException
+            {
         // TODO handle shortcuts
         if (JFCEventId.KEY_PRESSED == eventId)
@@ -572,5 +569,5 @@
             {
                 Console.traceln(Level.SEVERE, "log file has an error, as it contains a key up event on key " +
-                                   key + " for which there is no preceeding key down event");
+                        key + " for which there is no preceeding key down event");
             }
 
@@ -579,5 +576,5 @@
 
         throw new SAXException("unknown event id " + eventId);
-    }
+            }
 
     /**
@@ -596,6 +593,6 @@
      */
     private IInteraction handleNewFocus(JFCEventId eventId, Map<String, String> eventParameters)
-        throws SAXException
-    {
+            throws SAXException
+            {
         if (JFCEventId.FOCUS_GAINED == eventId)
         {
@@ -606,86 +603,6 @@
             throw new SAXException("unknown event id " + eventId);
         }
-    }
-
-    /**
-     * <p>
-     * for some events in the log file, no GUI element specification is provided. In this case the
-     * GUI element on which the event is executed must be determined based on the
-     * <code>toString</code> parameter of the event. This is achieved through this method. The
-     * <code>toString</code> parameter does not always carry sufficient information for the GUI
-     * elements. For example the title is not necessarily provided. Therefore some of this
-     * information is generated.
-     * </p>
-     *
-     * @param toStringValue
-     *            the <code>toString</code> parameter of the event to be parsed for the GUI element
-     *            
-     * @return the appropriate GUI Element
-     * 
-     * @throws SAXException thrown if the provided value of the <code>toString</code> parameter
-     *                      can not be parsed
-     */
-    private void getGUIElementSpecFromToString(String toStringValue)
-        throws SAXException
-    {
-        try
-        {
-            // match the following: <type>[<parameters>]
-            String pattern = "([\\w$\\.]*)\\[(.*)\\]";
-            Matcher matcher = Pattern.compile(pattern).matcher(toStringValue);
-
-            if (!matcher.find())
-            {
-                throw new IllegalArgumentException
-                    ("could not parse target from toString parameter");
-            }
-
-            String type = matcher.group(1);
-            
-            // match the following: <parameter>|,
-            // where <parameter> := <digitValue>|<value>|<key>"="<value>
-            pattern = "([\\w$@=\\.]*)|,";
-
-            matcher = Pattern.compile(pattern).matcher(matcher.group(2));
-            
-            float elementHash = -1;
-            
-            pattern = "(([\\d]*)|([\\w$]*)|(([\\w$@\\.]*)=([\\w$@\\.]*)))\\z";
-            Pattern valuePattern = Pattern.compile(pattern);
-            
-            while (matcher.find()) {
-                Matcher valueMatcher = valuePattern.matcher(matcher.group(1));
-                if (valueMatcher.find()) {
-                    if ((valueMatcher.group(2) != null) && (!"".equals(valueMatcher.group(2)))) {
-                        // found digit value. Those in combination usually denote the position
-                        // of the GUI element. So calculate an element has out of them
-                        elementHash += Integer.parseInt(valueMatcher.group(2));
-                    }
-                    else if ((valueMatcher.group(5) != null) &&
-                             (!"".equals(valueMatcher.group(5))) &&
-                             (valueMatcher.group(6) != null) &&
-                             (!"".equals(valueMatcher.group(6))))
-                    {
-                        // found a key value pair. Get some of them and integrate them into the hash 
-                        String key = valueMatcher.group(5);
-                        
-                        if ("alignmentX".equals(key) || "alignmentY".equals(key)) {
-                            elementHash += Float.parseFloat(valueMatcher.group(6));
-                        }
-                    }
-                }
-            }
-
-            currentGuiElementSpec.setName("unknown(" + ((int) elementHash) + ")");
-            currentGuiElementSpec.setType(type);
-            currentGuiElementSpec.setIndex(-1);
-            currentGuiElementSpec.setElementHash((int) elementHash);
-        }
-        catch (Exception e)
-        {
-            throw new SAXException("could not parse target", e);
-        }
-    }
-    
+            }
+
     /**
      * <p>
