Index: /trunk/sources/HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj	(revision 10323)
+++ /trunk/sources/HeuristicLab.Collections/3.3/HeuristicLab.Collections-3.3.csproj	(revision 10324)
@@ -157,4 +157,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
Index: /trunk/sources/HeuristicLab.Collections/3.3/ObservableArray.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/ObservableArray.cs	(revision 10323)
+++ /trunk/sources/HeuristicLab.Collections/3.3/ObservableArray.cs	(revision 10324)
@@ -25,4 +25,5 @@
 using System.ComponentModel;
 using System.Linq;
+using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -168,5 +169,5 @@
         Array.Clear(array, index, length);
         OnPropertyChanged("Item[]");
-        OnItemsReplaced(GetIndexedItems(index, length), oldItems); 
+        OnItemsReplaced(GetIndexedItems(index, length), oldItems);
       }
     }
@@ -205,5 +206,5 @@
       if (array.Length > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems();
-        Array.Sort<T>(array);
+        array.StableSort();
         OnPropertyChanged("Item[]");
         OnItemsMoved(GetIndexedItems(), oldItems);
@@ -213,5 +214,5 @@
       if (array.Length > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems();
-        Array.Sort<T>(array, comparison);
+        array.StableSort(comparison);
         OnPropertyChanged("Item[]");
         OnItemsMoved(GetIndexedItems(), oldItems);
@@ -221,5 +222,5 @@
       if (array.Length > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems();
-        Array.Sort<T>(array, comparer);
+        array.StableSort(comparer);
         OnPropertyChanged("Item[]");
         OnItemsMoved(GetIndexedItems(), oldItems);
@@ -229,5 +230,5 @@
       if (length > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems(index, length);
-        Array.Sort<T>(array, index, length);
+        array.StableSort(index, length);
         OnPropertyChanged("Item[]");
         OnItemsMoved(GetIndexedItems(index, length), oldItems);
@@ -237,5 +238,5 @@
       if (length > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems(index, length);
-        Array.Sort<T>(array, index, length, comparer);
+        array.StableSort(index, length, comparer);
         OnPropertyChanged("Item[]");
         OnItemsMoved(GetIndexedItems(index, length), oldItems);
Index: /trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs	(revision 10323)
+++ /trunk/sources/HeuristicLab.Collections/3.3/ObservableList.cs	(revision 10324)
@@ -25,4 +25,5 @@
 using System.ComponentModel;
 using System.Linq;
+using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -320,5 +321,5 @@
       if (list.Count > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems();
-        list.Sort();
+        list.StableSort();
         OnItemsMoved(GetIndexedItems(), oldItems);
         OnPropertyChanged("Item[]");
@@ -328,5 +329,5 @@
       if (list.Count > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems();
-        list.Sort(comparison);
+        list.StableSort(comparison);
         OnItemsMoved(GetIndexedItems(), oldItems);
         OnPropertyChanged("Item[]");
@@ -336,5 +337,5 @@
       if (list.Count > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems();
-        list.Sort(comparer);
+        list.StableSort(comparer);
         OnItemsMoved(GetIndexedItems(), oldItems);
         OnPropertyChanged("Item[]");
@@ -344,5 +345,5 @@
       if (count > 1) {
         IndexedItem<T>[] oldItems = GetIndexedItems(index, count);
-        list.Sort(index, count, comparer);
+        list.StableSort(index, count, comparer);
         OnItemsMoved(GetIndexedItems(index, count), oldItems);
         OnPropertyChanged("Item[]");
Index: /trunk/sources/HeuristicLab.Collections/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/Plugin.cs.frame	(revision 10323)
+++ /trunk/sources/HeuristicLab.Collections/3.3/Plugin.cs.frame	(revision 10324)
@@ -29,4 +29,5 @@
   [PluginFile("HeuristicLab.Collections-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   public class HeuristicLabCollectionsPlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.Common/3.3/ArrayExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/ArrayExtensions.cs	(revision 10324)
+++ /trunk/sources/HeuristicLab.Common/3.3/ArrayExtensions.cs	(revision 10324)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Common {
+  public static class ArrayExtensions {
+    public static void StableSort<T>(this T[] values) {
+      values.StableSort(0, values.Length);
+    }
+
+    public static void StableSort<T>(this T[] values, int index, int count) {
+      var sortedArray = values.Skip(index).Take(count).OrderBy(x => x).ToArray();
+      Array.ConstrainedCopy(sortedArray, 0, values, index, count);
+    }
+
+    public static void StableSort<T>(this T[] values, IComparer<T> comparer) {
+      values.StableSort(0, values.Length, comparer);
+    }
+
+    public static void StableSort<T>(this T[] values, int index, int count, IComparer<T> comparer) {
+      var sortedArray = values.Skip(index).Take(count).OrderBy(x => x, comparer).ToArray();
+      Array.ConstrainedCopy(sortedArray, 0, values, index, count);
+    }
+
+    public static void StableSort<T>(this T[] values, Comparison<T> comparison) {
+      values.StableSort(0, values.Length, comparison);
+    }
+
+    public static void StableSort<T>(this T[] values, int index, int count, Comparison<T> comparison) {
+      var sortedArray = values.Skip(index).Take(count).OrderBy(x => x, new StableSortComparer<T>(comparison)).ToArray();
+      Array.ConstrainedCopy(sortedArray, 0, values, index, count);
+    }
+
+    public class StableSortComparer<T> : IComparer<T> {
+      public StableSortComparer(Comparison<T> comparison) {
+        this.comparison = comparison;
+      }
+      public int Compare(T x, T y) {
+        return comparison(x, y);
+      }
+      private readonly Comparison<T> comparison;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj	(revision 10323)
+++ /trunk/sources/HeuristicLab.Common/3.3/HeuristicLab.Common-3.3.csproj	(revision 10324)
@@ -124,4 +124,6 @@
     <Compile Include="Content\IStorableContent.cs" />
     <Compile Include="Constants.cs" />
+    <Compile Include="ArrayExtensions.cs" />
+    <Compile Include="ListExtensions.cs" />
     <Compile Include="Point2D.cs" />
     <Compile Include="EnumerableExtensions.cs" />
Index: /trunk/sources/HeuristicLab.Common/3.3/ListExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/ListExtensions.cs	(revision 10324)
+++ /trunk/sources/HeuristicLab.Common/3.3/ListExtensions.cs	(revision 10324)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace HeuristicLab.Common {
+  public static class ListExtensions {
+    public static void StableSort<T>(this List<T> values) {
+      values.StableSort(0, values.Count);
+    }
+
+    public static void StableSort<T>(this List<T> values, int index, int count) {
+      var orderedList = values.Skip(index).Take(count).OrderBy(x => x).ToList();
+      values.Clear();
+      values.AddRange(orderedList);
+    }
+
+    public static void StableSort<T>(this List<T> values, IComparer<T> comparer) {
+      values.StableSort(0, values.Count, comparer);
+    }
+
+    public static void StableSort<T>(this List<T> values, int index, int count, IComparer<T> comparer) {
+      var orderedList = values.OrderBy(x => x, comparer).ToList();
+      values.Clear();
+      values.AddRange(orderedList);
+    }
+
+    public static void StableSort<T>(this List<T> values, Comparison<T> comparison) {
+      values.StableSort(0, values.Count, comparison);
+    }
+
+    public static void StableSort<T>(this List<T> values, int index, int count, Comparison<T> comparison) {
+      var orderedList = values.OrderBy(x => x, new StableSortComparer<T>(comparison)).ToList();
+      values.Clear();
+      values.AddRange(orderedList);
+    }
+
+    public class StableSortComparer<T> : IComparer<T> {
+      public StableSortComparer(Comparison<T> comparison) {
+        this.comparison = comparison;
+      }
+      public int Compare(T x, T y) {
+        return comparison(x, y);
+      }
+      private readonly Comparison<T> comparison;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs	(revision 10323)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs	(revision 10324)
@@ -832,7 +832,7 @@
       ts.SetSeedRandomly.Value = false;
       RunAlgorithm(ts);
-      Assert.AreEqual(6441, GetDoubleResult(ts, "BestQuality"));
-      Assert.AreEqual(7401.666666666667, GetDoubleResult(ts, "CurrentAverageQuality"));
-      Assert.AreEqual(8418, GetDoubleResult(ts, "CurrentWorstQuality"));
+      Assert.AreEqual(6294, GetDoubleResult(ts, "BestQuality"));
+      Assert.AreEqual(7380.0386666666664, GetDoubleResult(ts, "CurrentAverageQuality"));
+      Assert.AreEqual(8328, GetDoubleResult(ts, "CurrentWorstQuality"));
       Assert.AreEqual(750000, GetIntResult(ts, "EvaluatedMoves"));
     }
@@ -903,8 +903,8 @@
       vrp.SetSeedRandomly.Value = false;
       RunAlgorithm(vrp);
-      Assert.AreEqual(1436, GetDoubleResult(vrp, "BestQuality"));
-      Assert.AreEqual(2132.2478893442621, GetDoubleResult(vrp, "CurrentAverageQuality"));
-      Assert.AreEqual(4176.0, GetDoubleResult(vrp, "CurrentWorstQuality"));
-      Assert.AreEqual(119011, GetIntResult(vrp, "EvaluatedMoves"));
+      Assert.AreEqual(1473, GetDoubleResult(vrp, "BestQuality"));
+      Assert.AreEqual(2102.1192622950812, GetDoubleResult(vrp, "CurrentAverageQuality"));
+      Assert.AreEqual(4006, GetDoubleResult(vrp, "CurrentWorstQuality"));
+      Assert.AreEqual(119072, GetIntResult(vrp, "EvaluatedMoves"));
     }
 
Index: /trunk/sources/HeuristicLab.Tests/TestRandom.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/TestRandom.cs	(revision 10323)
+++ /trunk/sources/HeuristicLab.Tests/TestRandom.cs	(revision 10324)
@@ -61,7 +61,7 @@
 
     public TestRandom(int[] intNumbers, double[] doubleNumbers) {
-      if (intNumbers == null) intNumbers = new int[0];
+      if (intNumbers == null) this.intNumbers = new int[0];
       else this.intNumbers = intNumbers;
-      if (doubleNumbers == null) doubleNumbers = new double[0];
+      if (doubleNumbers == null) this.doubleNumbers = new double[0];
       else this.doubleNumbers = doubleNumbers;
       nextIntIndex = 0;
