Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraintsParser.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraintsParser.cs	(revision 16957)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalConstraintsParser.cs	(revision 17146)
@@ -28,6 +28,12 @@
   public static class IntervalConstraintsParser {
 
-    public static IEnumerable<IntervalConstraint> ParseInput(string input, string target = "", IEnumerable<string> variables = null) {
-      var lines = input.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
+    public static IEnumerable<IntervalConstraint> ParseInput(string inputText, string target, IEnumerable<string> variables) {
+
+      if (string.IsNullOrEmpty(inputText)) throw new ArgumentNullException("No input text has been provided.");
+      if (string.IsNullOrEmpty(target)) throw new ArgumentNullException("No target variable has been provided.");
+      if (variables == null) throw new ArgumentNullException("No variables have been provided.");
+      if (!variables.Any()) throw new ArgumentException("Varialbes are empty.");
+
+      var lines = inputText.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
       foreach (var line in lines) {
         var trimmedLine = line.TrimStart();
@@ -36,10 +42,10 @@
           var start = "Target:".Length;
           var end = trimmedLine.Length;
-          var targetConstraint = trimmedLine.Substring(start, end-start);
+          var targetConstraint = trimmedLine.Substring(start, end - start);
           var match = Regex.Match(targetConstraint,
             @"(['](.*)[']|(.*[^\s]))\s*(\bin\b)\s*([\[\]])\s*(\S*)\s*(\.{2})\s*(\S*)\s*([\[\]])");
           if (match.Success) {
             if (match.Groups.Count != 10) {
-              throw new ArgumentException("The given target-constraint is not complete!");
+              throw new ArgumentException("The target-constraint is not complete.");
             } else {
               var targetVariable = match.Groups[1].Value.Trim();
@@ -47,9 +53,9 @@
                 targetVariable = targetVariable.Substring(1, targetVariable.Length - 2);
               }
-              if (target != "") {
-                if (targetVariable != target) {
-                  throw new ArgumentException("The given target variable is not in the given dataset!");
-                }
+
+              if (targetVariable != target) {
+                throw new ArgumentException($"The target variable {targetVariable}  does not match the provided target {target}.");
               }
+
               var lowerBound = ParseIntervalBounds(match.Groups[6].Value);
               var upperBound = ParseIntervalBounds(match.Groups[8].Value);
@@ -68,5 +74,5 @@
             }
           } else {
-            throw new ArgumentException("The inserted target constraint is not valid!");
+            throw new ArgumentException("The inserted target constraint is not valid.");
           }
           //Check for derivation
@@ -77,5 +83,5 @@
           if (match.Success) {
             if (match.Groups.Count != 17) {
-              throw new ArgumentException("The given derivation-constraint is not complete");
+              throw new ArgumentException("The given derivation-constraint is not complete.");
             } else {
               var derivationTarget = match.Groups[3].Value.Trim();
@@ -88,20 +94,18 @@
                 derivationVariable = derivationVariable.Substring(1, derivationVariable.Length - 2);
               }
-              if (target != "") {
-                if (derivationTarget != target) 
-                  throw new ArgumentException("The given target variable is not given in the dataset!");
+
+              if (derivationTarget != target) {
+                throw new ArgumentException($"The target variable {derivationTarget}  does not match the provided target {target}.");
               }
 
-              if (variables != null && variables.Any()) {
-                if (variables.All(v => v != derivationVariable)) {
-                  throw new ArgumentException("The given variable does not exist in the dataset!");
-                }
+              if (variables.All(v => v != derivationVariable)) {
+                throw new ArgumentException($"The given variable {derivationVariable} does not exist in the dataset.");
               }
 
               if (match.Groups[2].Value.Trim() != "" || match.Groups[11].Value.Trim() != "") {
                 if (match.Groups[2].Value.Trim() == "" || match.Groups[11].Value.Trim() == "")
-                  throw new ArgumentException("Number of derivation has to be written on both sides!");
+                  throw new ArgumentException("Number of derivation has to be written on both sides.");
                 if (match.Groups[2].Value.Trim() != match.Groups[11].Value.Trim())
-                  throw new ArgumentException("Derivation number is not equal on both sides!");
+                  throw new ArgumentException("Derivation number is not equal on both sides.");
               }
 
@@ -122,5 +126,5 @@
             }
           } else {
-            throw new ArgumentException("The inserted derivation constraint is not valid!");
+            throw new ArgumentException("The inserted derivation constraint is not valid.");
           }
           //Check for comment
