Index: trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTest.cs
===================================================================
--- trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTest.cs	(revision 1547)
+++ trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTest.cs	(revision 1548)
@@ -50,4 +50,6 @@
     /// <returns>The p-value of the test</returns>
     public static double TwoTailedTest(double[] p1, double[] p2) {
+      Array.Sort<double>(p1);
+      Array.Sort<double>(p2);
       double rank = MannWhitneyWilcoxonTest.CalculateRankSumForP1(p1, p2);
       return MannWhitneyWilcoxonTest.ApproximatePValue(rank, p1.Length, p2.Length, true);
@@ -70,4 +72,6 @@
     /// <returns>True if H0 (p1 equals p2) can be rejected, False otherwise</returns>
     public static bool TwoTailedTest(double[] p1, double[] p2, double alpha) {
+      Array.Sort<double>(p1);
+      Array.Sort<double>(p2);
       return MannWhitneyWilcoxonTest.TwoTailedTest(p1, p2, alpha, 20);
     }
@@ -120,4 +124,6 @@
     /// <returns>The p-value of the test</returns>
     public static double TwoTailedTest(int[] p1, int[] p2) {
+      Array.Sort<int>(p1);
+      Array.Sort<int>(p2);
       double rank = MannWhitneyWilcoxonTest.CalculateRankSumForP1(p1, p2);
       return MannWhitneyWilcoxonTest.ApproximatePValue(rank, p1.Length, p2.Length, true);
@@ -181,9 +187,9 @@
       double U1 = rank - (double)(nRank * (nRank + 1) / 2);
       double U2 = (double)(nRank * nOther) - U1;
-      if (alpha <= 0.01) {
+      if (alpha < 0.05) {
         return (Math.Min(U1, U2) <= table001[nRank - 1, nOther - 1]);
-      } else if (alpha <= 0.05) {
+      } else if (alpha < 0.1) {
         return (Math.Min(U1, U2) <= table005[nRank - 1, nOther - 1]);
-      } else if (alpha <= 0.1) {
+      } else if (Math.Abs(alpha - 0.1) < 1e-07) {
         return (Math.Min(U1, U2) <= table01[nRank - 1, nOther - 1]);
       } else throw new ArgumentException("ERROR in MannWhitneyWilcoxonTest: alpha must be <= 0.1");
@@ -197,5 +203,7 @@
       double sigma = Math.Sqrt(nRank * nOther * (nRank + nOther + 1) / 12);
       double z = (Math.Min(U1, U2) - mu) / sigma;
-      return ProbabilityOfZValue(z);
+      if (twoTailed) {
+        return 2 * ProbabilityOfZValue(z);
+      } else return ProbabilityOfZValue(z);
     }
 
Index: trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTestControl.cs
===================================================================
--- trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTestControl.cs	(revision 1547)
+++ trunk/sources/HeuristicLab.StatisticalAnalysis/3.2/MannWhitneyWilcoxonTestControl.cs	(revision 1548)
@@ -48,15 +48,15 @@
     private double[] ConvertStringToArray(TextBox p) {
       string t = p.Text;
-      string[] s = t.Split(new char[] { ';' });
-      double[] tmp = new double[s.Length];
-      try {
-        for (int i = 0; i < s.Length; i++) {
-          tmp[i] = double.Parse(s[i]);
+      string[] s = t.Split(new char[] { ';', ' ', '\t' });
+      List<double> tmp = new List<double>();
+      for (int i = 0; i < s.Length; i++) {
+        try {
+          double val = double.Parse(s[i]);
+          tmp.Add(val);
         }
+        catch (FormatException) { }
       }
-      catch (FormatException) {
-        return null;
-      }
-      return tmp;
+      if (tmp.Count > 0) return tmp.ToArray();
+      else return null;
     }
 
@@ -81,6 +81,11 @@
       double[] p2 = ConvertStringToArray(p2TextBox);
       if (p1.Length > 20 || p2.Length > 20) {
-        MessageBox.Show("Sample size is too large for exact calculation, do not use more than 20 samples in each population.");
-        return;
+        double[] tmp = new double[Math.Min(20, p1.Length)];
+        for (int i = 0; i < Math.Min(20, p1.Length); i++) tmp[i] = p1[i];
+        p1 = tmp;
+        tmp = new double[Math.Min(20, p2.Length)];
+        for (int i = 0; i < Math.Min(20, p2.Length); i++) tmp[i] = p2[i];
+        p2 = tmp;
+        MessageBox.Show("Caution: Sample size is too large for exact calculation. Only the first 20 samples are used for the test!");
       }
       double alpha = Double.Parse(alphaTextBox.Text);
