Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs	(revision 11979)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs	(revision 12017)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,9 +21,10 @@
 
 using HeuristicLab.Analysis;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Analyzers {
-  [Item("SymbolicDataAnalysisBottomUpDiversityAnalyzer", "A diversity analyzer based on the bottom-up similarity between trees.")]
+  [Item("SymbolicDataAnalysisBottomUpDiversityAnalyzer", "A diversity analyzer based on the bottom-up distance between trees.")]
   [StorableClass]
   public class SymbolicDataAnalysisBottomUpDiversityAnalyzer : SingleObjectivePopulationDiversityAnalyzer {
@@ -31,6 +32,10 @@
     protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(bool deserializing) : base(deserializing) { }
 
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
+    private SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicDataAnalysisBottomUpDiversityAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisBottomUpDiversityAnalyzer(this, cloner);
     }
 
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisPhenotypicDiversityAnalyzer.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisPhenotypicDiversityAnalyzer.cs	(revision 11979)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisPhenotypicDiversityAnalyzer.cs	(revision 12017)
@@ -22,4 +22,5 @@
 using System.Linq;
 using HeuristicLab.Analysis;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -29,7 +30,8 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Analyzers {
-  [Item("SymbolicDataAnalysisPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic similarity between trees")]
+  [Item("SymbolicDataAnalysisPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
   [StorableClass]
   public class SymbolicDataAnalysisPhenotypicDiversityAnalyzer : SingleObjectivePopulationDiversityAnalyzer {
+    #region parameter names
     private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
     private const string EvaluatedValuesParameterName = "EstimatedValues";
@@ -37,5 +39,7 @@
     private const string ProblemDataParameterName = "ProblemData";
     private const string EstimationLimitsParameterName = "EstimationLimits";
+    #endregion
 
+    #region parameter properties
     public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
       get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
@@ -56,8 +60,9 @@
       get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
     }
+    #endregion
 
     public SymbolicDataAnalysisPhenotypicDiversityAnalyzer() {
       SimilarityCalculator = new PhenotypicSimilarityCalculator { SolutionVariableName = "SymbolicExpressionTree" };
-
+      #region add parameters
       Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees."));
       Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(EvaluatedValuesParameterName, "Intermediate estimated values to be saved in the scopes."));
@@ -65,4 +70,18 @@
       Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
       Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
+      #endregion
+    }
+
+    [StorableConstructor]
+    protected SymbolicDataAnalysisPhenotypicDiversityAnalyzer(bool deserializing)
+      : base(deserializing) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisPhenotypicDiversityAnalyzer(this, cloner);
+    }
+
+    private SymbolicDataAnalysisPhenotypicDiversityAnalyzer(SymbolicDataAnalysisPhenotypicDiversityAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
     }
 
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs	(revision 11979)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs	(revision 12017)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -81,5 +81,5 @@
 
       // visit nodes in order of decreasing height to ensure correct mapping
-      var nodes1 = n1.IterateNodesPrefix().ToList();
+      var nodes1 = n1.IterateNodesPrefix().OrderByDescending(x => x.GetDepth()).ToList();
       var nodes2 = n2.IterateNodesPrefix().ToList();
       for (int i = 0; i < nodes1.Count; ++i) {
@@ -98,6 +98,8 @@
         if (w == null) continue;
 
-        // at this point we know that v and w are isomorphic, however, the mapping cannot be done directly (as in the paper) because the trees are unordered (subtree order might differ)
-        // the solution is to sort subtrees by label using IterateBreadthOrdered (this will work because the subtrees are isomorphic!) and simultaneously iterate over the two subtrees
+        // at this point we know that v and w are isomorphic, however, the mapping cannot be done directly
+        // (as in the paper) because the trees are unordered (subtree order might differ). the solution is 
+        // to sort subtrees from under commutative labels (this will work because the subtrees are isomorphic!)
+        // while iterating over the two subtrees
         var vv = IterateBreadthOrdered(v, comparer).ToList();
         var ww = IterateBreadthOrdered(w, comparer).ToList();
@@ -133,5 +135,5 @@
       foreach (var n in nodes) {
         if (n.SubtreeCount == 0) {
-          var label = Label(n);
+          var label = GetLabel(n);
           if (!labelMap.ContainsKey(label)) {
             var z = new GraphNode { SymbolicExpressionTreeNode = n, Label = label };
@@ -209,5 +211,5 @@
     }
 
-    private static string Label(ISymbolicExpressionTreeNode node) {
+    private static string GetLabel(ISymbolicExpressionTreeNode node) {
       if (node.SubtreeCount > 0)
         return node.Symbol.Name;
Index: branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
===================================================================
--- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs	(revision 11979)
+++ branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs	(revision 12017)
@@ -34,16 +34,18 @@
     public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; set; }
 
+    [StorableConstructor]
+    protected PhenotypicSimilarityCalculator(bool deserializing) : base(deserializing) { }
+
     public PhenotypicSimilarityCalculator(PhenotypicSimilarityCalculator original, Cloner cloner)
       : base(original, cloner) {
+      this.ProblemData = original.ProblemData;
+      this.Interpreter = original.Interpreter;
     }
-
-    public PhenotypicSimilarityCalculator() { }
-
-    [StorableConstructor]
-    protected PhenotypicSimilarityCalculator(bool deserializing) : base(deserializing) { }
 
     public override IDeepCloneable Clone(Cloner cloner) {
       return new PhenotypicSimilarityCalculator(this, cloner);
     }
+
+    public PhenotypicSimilarityCalculator() { }
 
     public double CalculateSimilarity(ISymbolicExpressionTree t1, ISymbolicExpressionTree t2) {
