Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs	(revision 10837)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs	(revision 10838)
@@ -29,5 +29,9 @@
         if (!node.Parents.Any()) {
           var fragmentNode = new FragmentNode {
-            Content = new Fragment<ISymbolicExpressionTreeNode> { Root = node.Content.NodeAt(index) },
+            Content = new Fragment<ISymbolicExpressionTreeNode> {
+              Root = node.Content.Root,
+              //              Root = node.Content.NodeAt(index)
+              Index1 = index
+            },
             Rank = node.Rank,
             Quality = node.Quality
@@ -36,4 +40,5 @@
             var arc = new GenealogyGraphArc { Source = parent, Target = fragmentNode };
             parent.AddForwardArc(arc);
+            fragmentNode.AddReverseArc(parent);
           }
           yield return fragmentNode; // no tracing if there are no parents
@@ -41,12 +46,8 @@
         }
         var parents = node.Parents.ToList();
-        if (node.IsElite) {
+        var fragment = (IFragment<ISymbolicExpressionTreeNode>)node.InArcs.Last().Data;
+
+        if (node.IsElite || fragment == null) {
           // skip elite, go up the graph to original individual
-          node = parents[0];
-          continue;
-        }
-        var fragment = (IFragment<ISymbolicExpressionTreeNode>)node.InArcs.Last().Data;
-        if (fragment == null) {
-          // the fragment can be null when crossover or mutation did not actually make any change => then we skip
           node = parents[0];
           continue;
@@ -60,5 +61,10 @@
           // we are tracing a mutation operation
           var fragmentNode = new FragmentNode {
-            Content = new Fragment<ISymbolicExpressionTreeNode> { Root = subtree },
+            Content = new Fragment<ISymbolicExpressionTreeNode> {
+              Root = tree.Root,
+              //              Root = subtree
+              Index1 = index,
+              Index2 = fragment.Index1
+            },
             Rank = node.Rank,
             Quality = node.Quality
@@ -67,4 +73,5 @@
             var arc = new GenealogyGraphArc { Source = parent, Target = fragmentNode };
             parent.AddForwardArc(arc);
+            fragmentNode.AddReverseArc(parent);
           }
           yield return fragmentNode;
@@ -98,5 +105,9 @@
               // subtree contains fragment => bifurcation point in the fragment graph
               var fragmentNode = new FragmentNode {
-                Content = new Fragment<ISymbolicExpressionTreeNode> { Root = subtree },
+                Content = new Fragment<ISymbolicExpressionTreeNode> {
+                  Root = tree.Root,
+                  Index1 = index,
+                  Index2 = fragment.Index1
+                },
                 Rank = node.Rank,
                 Quality = node.Quality
@@ -105,6 +116,7 @@
                 var arc = new GenealogyGraphArc { Source = parent, Target = fragmentNode };
                 parent.AddForwardArc(arc);
+                fragmentNode.AddReverseArc(parent);
               }
-              fragmentNode.Content.Index1 = fragment.Index1 - index;
+              //              fragmentNode.Content.Index1 = fragment.Index1 - index;
               yield return fragmentNode;
 
@@ -131,9 +143,4 @@
     }
     #region some helper methods for shortening the tracing code
-    private static void AddChild(this IGenealogyGraphNode parent, IGenealogyGraphNode child) {
-      parent.AddForwardArc(child);
-      child.AddReverseArc(parent);
-      child.Rank = parent.Rank - 1;
-    }
     private static ISymbolicExpressionTreeNode NodeAt(this ISymbolicExpressionTree tree, int position) {
       return NodeAt(tree.Root, position);
@@ -142,15 +149,4 @@
       return root.IterateNodesPrefix().ElementAt(position);
     }
-    private static int IndexOf(this ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode node) {
-      return IndexOf(tree.Root, node);
-    }
-    private static int IndexOf(this ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode node) {
-      int i = 0;
-      foreach (var n in root.IterateNodesPrefix()) {
-        if (n == node) return i;
-        ++i;
-      }
-      return -1;
-    }
     #endregion
   }
