Index: /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/in/ModelReader.java
===================================================================
--- /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/in/ModelReader.java	(revision 65)
+++ /Code/ModelTranslator/src/de/uni_hildesheim/sse/trans/in/ModelReader.java	(revision 66)
@@ -38,5 +38,4 @@
     static {
         EASyLoggerFactory.INSTANCE.setLogger(new AdvancedJavaLogger());
-        //EASyLoggerFactory.INSTANCE.setLoggingLevel(LoggingLevel.DEBUG);
     }
     
@@ -53,5 +52,4 @@
     public ModelReader(File modelFile) throws FileNotFoundException {
         reader = new BufferedReader(new FileReader(modelFile));
-        
         
         String name = FilenameUtils.removeExtension(modelFile.getName());
@@ -92,71 +90,84 @@
      * 
      * @param line the line to read
-     * @param ebene for debug TODO
+     * @param layer the recursion depth
      * @return a {@link ConstraintSyntaxTree} representing the line
      */
-    public ConstraintSyntaxTree parseLine(String line, int ebene) {
-        StringBuffer debugLine = new StringBuffer();
-        for (int i = 0; i < ebene; i++) {
-            debugLine.append('\t');
-        }
-        debugLine.append(line);
-       
+    ConstraintSyntaxTree parseLine(String line, int layer) {
+        ConstraintSyntaxTree result = null;
         if (line.startsWith("def(") && line.indexOf(')') == line.lastIndexOf(')')) {
             String variableName = line.substring("def(".length(), line.length() - 1);
-            LOGGER.debug(debugLine.toString());
-            return new Variable(getVariable(variableName));
-        }
-        
-        if (line.startsWith("!def(") && line.indexOf(')') == line.lastIndexOf(')')) {
+            result = new Variable(getVariable(variableName));
+        } else if (line.startsWith("!def(") && line.indexOf(')') == line.lastIndexOf(')')) {
             String variableName = line.substring("!def(".length(), line.length() - 1);
-            LOGGER.debug(debugLine.toString());
-            return new OCLFeatureCall(new Variable(getVariable(variableName)), OclKeyWords.NOT);
-        }
-        
-        int highestOperandPos = line.length();
-        int highestOperandLevel = Integer.MAX_VALUE;
-        String highestOperand = "";
+            result = new OCLFeatureCall(new Variable(getVariable(variableName)), OclKeyWords.NOT);
+        } else {
+            
+            int highestOperandPos = line.length();
+            int highestOperandLevel = Integer.MAX_VALUE;
+            String highestOperand = "";
+            int currentLevel = 0;
+            for (int i = 0; i < line.length(); i++) {
+                char c = line.charAt(i);
+                switch (c) {
+                case '(':
+                    currentLevel++;
+                    break;
+                case ')':
+                    currentLevel--;
+                    break;
+                    
+                case '&':
+                    if (highestOperandLevel > currentLevel) {
+                        highestOperand = OclKeyWords.AND;
+                        highestOperandPos = i;
+                        highestOperandLevel = currentLevel;
+                    }
+                    break;
+                
+                case '|':
+                    if (highestOperandLevel > currentLevel) {
+                        highestOperand = OclKeyWords.OR;
+                        highestOperandPos = i;
+                        highestOperandLevel = currentLevel;
+                    }
+                    break;
+                
+                default:
+                    break;
+                }
+            }
+            
+            StringBuffer left = new StringBuffer();
+            StringBuffer right = new StringBuffer();
+            
+            split(line, highestOperandPos, highestOperandLevel, left, right);
+            
+            ConstraintSyntaxTree leftSide = parseLine(left.toString(), layer + 1);
+            ConstraintSyntaxTree rightSide = parseLine(right.toString(), layer + 1);
+            result = new OCLFeatureCall(leftSide, highestOperand, rightSide);
+            
+            if (layer > 0) {
+                result = new Parenthesis(result);
+            }
+        }
+        
+        return result;
+    }
+    
+    /**
+     * Splits the given line at the given operand position into a left and right part.
+     * @param line The whole line
+     * @param operandPos The position of the operand in the line
+     * @param operandLevel The logic level of the operand (by counting brackets)
+     * @param left A {@link StringBuffer} where the left side of the operand will be written to
+     * @param right A {@link StringBuffer} where the right side of the operand will be written to
+     */
+    private void split(String line, int operandPos, int operandLevel, StringBuffer left, StringBuffer right) {
+        left.append(line.substring(0, operandPos));
+        right.append(line.substring(operandPos + 1, line.length()));
         int currentLevel = 0;
-        for (int i = 0; i < line.length(); i++) {
-            char c = line.charAt(i);
-            switch (c) {
-            case '(':
-                currentLevel++;
-                break;
-            case ')':
-                currentLevel--;
-                break;
-                
-            case '&':
-                if (highestOperandLevel > currentLevel) {
-                    highestOperand = OclKeyWords.AND;
-                    highestOperandPos = i;
-                    highestOperandLevel = currentLevel;
-                }
-                break;
-            
-            case '|':
-                if (highestOperandLevel > currentLevel) {
-                    highestOperand = OclKeyWords.OR;
-                    highestOperandPos = i;
-                    highestOperandLevel = currentLevel;
-                }
-                break;
-            
-            default:
-                break;
-            }
-        }
-        
-        debugLine.append(" -> " + highestOperand + " (" + highestOperandPos + ")");
-        LOGGER.debug(debugLine.toString());
-        
-        StringBuffer left = new StringBuffer(line.substring(0, highestOperandPos));
-        StringBuffer right = new StringBuffer(line.substring(highestOperandPos + 1, line.length()));
-        
-        currentLevel = 0;
         for (int i = 0; i < left.length(); i++) {
             char c = left.charAt(i);
-            if ((c == '(' || c == ')') && currentLevel < highestOperandLevel) {
+            if ((c == '(' || c == ')') && currentLevel < operandLevel) {
                 left.replace(i, i + 1, "");
             }
@@ -171,5 +182,5 @@
         for (int i = right.length() - 1; i >= 0; i--) {
             char c = right.charAt(i);
-            if ((c == '(' || c == ')') && currentLevel < highestOperandLevel) {
+            if ((c == '(' || c == ')') && currentLevel < operandLevel) {
                 right.replace(i, i + 1, "");
             }
@@ -181,14 +192,4 @@
             }
         }
-        
-        ConstraintSyntaxTree leftSide = parseLine(left.toString(), ebene + 1);
-        ConstraintSyntaxTree rightSide = parseLine(right.toString(), ebene + 1);
-        ConstraintSyntaxTree cst = new OCLFeatureCall(leftSide, highestOperand, rightSide);
-        
-        if (ebene > 0) {
-            cst = new Parenthesis(cst);
-        }
-        
-        return cst;
     }
     
