diff --git a/src/main/java/complexityparser/Model.java b/src/main/java/complexityparser/Model.java
index b620976382a0ce8f9b115ed8a18e6f4a59b3c1d4..0716dc92b604573ea6d3c0cda723b2fb41d9b62f 100644
--- a/src/main/java/complexityparser/Model.java
+++ b/src/main/java/complexityparser/Model.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser;
 
 import complexityparser.analyse.antlr.JavaLexer;
@@ -44,7 +43,8 @@ import java.nio.file.Path;
 import java.util.Arrays;
 
 /**
- * This class contains the code to be analysed by ANTLR and the resulting parse, lexer, and parse tree.
+ * This class contains the code to be analysed by ANTLR and the resulting parse,
+ * lexer, and parse tree.
  */
 public class Model extends Observable {
 
@@ -59,8 +59,8 @@ public class Model extends Observable {
     private boolean syntaxError = false;
 
     public Model() {
-	//The default Java program is below and in default.java.
-	String defaultCode = "class Exe{  void main() {\n #init \n #init \n }}";
+        //The default Java program is below and in default.java.
+        String defaultCode = "class Exe{  void main() {\n #init \n #init \n }}";
         Path p = new File("default.java").toPath();
         try {
             byte[] res = Files.readAllBytes(p);
@@ -68,7 +68,7 @@ public class Model extends Observable {
         } catch (IOException e) {
             e.printStackTrace();
         }
-	    setCode(defaultCode);
+        setCode(defaultCode);
     }
 
     public String getOutput() {
@@ -91,21 +91,23 @@ public class Model extends Observable {
         this.syntaxError = syntaxError;
     }
 
-
     /**
      *
-     * @return a java swing component representing a graphical view of the ANTLR generated tree.
+     * @return a java swing component representing a graphical view of the ANTLR
+     * generated parse tree.
      */
     public TreeViewer getTreeComponent() {
         TreeViewer viewer = new TreeViewer(Arrays.asList(parser.getRuleNames()), context);
-	// The scale of the ANTLR tree.
+        // The scale of the ANTLR tree.
         viewer.setScale(0.8);
         viewer.setTextColor(viewer.getForeground());
         return viewer;
     }
 
     /**
-     * Changes the String code that has to be analysed and performs the code analysis (It generates a new ANTLR tree).
+     * Changes the String code that has to be analysed and performs the code
+     * analysis (It generates a new ANTLR parse tree).
+     *
      * @param code - a string of code.
      */
     public void setCode(String code) {
@@ -130,10 +132,8 @@ public class Model extends Observable {
         //optional: Writes the call graph to a *.dot file
         //which can be compiled to an image using the dot command.
         //callGraphBuilder.getGraph().toFile("res.dot");
-
         //optional: Prints the strongly connected components to stdout.
         //System.out.println(callGraphBuilder.getGraph().getComponentsString());
-
         //Creates new outputs to redirect stdout and stderr to the interface instead of stdout.
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         Logger.setOut(new PrintStream(out));
@@ -147,10 +147,10 @@ public class Model extends Observable {
         secondPass.visit();
         /*
         Executes the last pass. Note that this pass call an overload visit method. 
-	This is very important as it will not work otherwise
+        This is very important as it will not work otherwise
         first and second pass need to be called with visit()
         final pass needs to be called with visit(ParseTree).
-        */
+         */
         FinalPass finalPass = new FinalPass(secondPass, tosBuilder, typingListener, token);
         finalPass.visit(context);
         Logger.setOut(System.out);
diff --git a/src/main/java/complexityparser/listeners/CallGraphBuilder.java b/src/main/java/complexityparser/listeners/CallGraphBuilder.java
index 3760a41a205b723b215c5bb74d31bb45f32a42c3..f9b1859bb39de7f34c0eefff46480ed466c04d23 100644
--- a/src/main/java/complexityparser/listeners/CallGraphBuilder.java
+++ b/src/main/java/complexityparser/listeners/CallGraphBuilder.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.listeners;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -27,10 +26,11 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * A class representing the call graph of a program.
- * The strongly connected components correspond to recursive and mutually recursive methods.
+ * A class representing the call graph of a program. The strongly connected
+ * components correspond to recursive and mutually recursive methods.
  */
 public class CallGraphBuilder extends JavaParserBaseListener {
+
     private Graph graph;
     private ParseTreeProperty<Integer> blockNumbers;
     private ParseTreeProperty<String> types;
@@ -38,8 +38,10 @@ public class CallGraphBuilder extends JavaParserBaseListener {
     private String currentNamespace;
 
     /**
-     * The table of symbols (tos) containing the tiered types of each symbol
-     * is used to build the method namespaces at the call and declaration locations.
+     * The table of symbols (tos) containing the tiered types of each symbol is
+     * used to build the method namespaces at the call and declaration
+     * locations.
+     *
      * @param tosBuilder - an object for building the tos.
      * @param typingListener - an object for builing the method namespace.
      */
@@ -53,7 +55,8 @@ public class CallGraphBuilder extends JavaParserBaseListener {
 
     /**
      * @param ctx - a parse tree.
-     * @return the block number associated to the parse tree #ctx in the #ParseTreeProperty<Integer> #blockNumbers.
+     * @return the block number associated to the parse tree ctx in the
+     * {@link CallGraphBuilder#blockNumbers} field.
      */
     private int getBlockNumber(ParseTree ctx) {
         return blockNumbers.get(ctx);
@@ -61,7 +64,8 @@ public class CallGraphBuilder extends JavaParserBaseListener {
 
     /**
      * @param ctx - a parse tree
-     * @return a string representation of the type of the expression corresponding to the parse tree #ctx.
+     * @return a string representation of the type of the expression
+     * corresponding to the parse tree ctx.
      */
     private String getType(ParseTree ctx) {
         return types.get(ctx);
@@ -76,10 +80,12 @@ public class CallGraphBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Handles method declarations in the parse tree by creating the method namespace 
-     * and by creating a corresponding node in the call graph.
-     * If the node already exists then its context attribute is set to the method declaration context #ctx.
-     * @param ctx - a parse tree.
+     * Handles method declarations in the parse tree by creating the method
+     * namespace and by creating a corresponding node in the call graph. If the
+     * node already exists then its context attribute is set to the method
+     * declaration context ctx.
+     *
+     * @param  ctx - a parse tree.
      */
     @Override
     public void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx) {
@@ -87,16 +93,17 @@ public class CallGraphBuilder extends JavaParserBaseListener {
         String namespace = tos.getMethodNamespace(ctx, getBlockNumber(ctx));
         currentNamespace = namespace;
         Node n = graph.get(namespace);
-        if(n == null) {
+        if (n == null) {
             graph.createNode(namespace, ctx);
-        }
-        else {
+        } else {
             n.setCtx(ctx);
         }
     }
 
     /**
-     * see {@link #enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx)}.
+     * see
+     * {@link #enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx)}.
+     *
      * @param ctx - a constructor declaration context.
      */
     @Override
@@ -106,7 +113,8 @@ public class CallGraphBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Handles the exit of a method declaration block. 
+     * Handles the exit of a method declaration block.
+     *
      * @param ctx - a method declaration context.
      */
     @Override
@@ -117,6 +125,7 @@ public class CallGraphBuilder extends JavaParserBaseListener {
 
     /**
      * Handles the exit of a constructor declaration block.
+     *
      * @param ctx - a constructor declaration context.
      */
     @Override
@@ -126,8 +135,10 @@ public class CallGraphBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Handles method calls by creating their namespace and by adding an arrow from the current namespace to
-     * the namespace of the called function in the graph.
+     * Handles method calls by creating their namespace and by adding an arrow
+     * from the current namespace to the namespace of the called function in the
+     * graph.
+     *
      * @param ctx - an expression call context.
      */
     @Override
@@ -146,8 +157,7 @@ public class CallGraphBuilder extends JavaParserBaseListener {
                 String t = getType(e);
                 param.add(t);
             }
-        }
-        else if(name.equals("clone")) {
+        } else if (name.equals("clone")) {
             //Adds no arrow for the clone method
             //since it is expected to be implemented by the language not the programmer.
             return;
@@ -155,37 +165,35 @@ public class CallGraphBuilder extends JavaParserBaseListener {
         /*
         Checks the receiver expression type, if it is not present the type of the current object is used.
          */
-        if(ctx.expression() != null) {
+        if (ctx.expression() != null) {
             type = getType(ctx.expression());
-        }
-        else {
+        } else {
             int no = getBlockNumber(ctx);
             type = tos.getClassName(no);
         }
         String namespace = TOS.buildMethodNamespace(param, type, name);
         //No check (currentNamespace == null) should be necessary.
         //If currentNamespace == null then a bug is present but elsewhere (probably in this class).
-        if(!currentNamespace.equals("constructor")) {
+        if (!currentNamespace.equals("constructor")) {
             graph.addConnection(currentNamespace, namespace);
         }
         //If the method calls itself (so not mutually recursive) then a special property needs to be added
         //to simplify the difference between recursive methods and mutually recursive methods.
-        if(namespace.equals(currentNamespace)) {
+        if (namespace.equals(currentNamespace)) {
             graph.get(currentNamespace).setRecursive(true);
-        }
-        else {
+        } else {
             String cn = currentNamespace;
             while (!cn.contains("<root>::Object::") && !cn.equals(namespace) && !cn.equals("constructor")) {
                 cn = tos.getParentNamespace(cn);
             }
-            if(cn.equals(namespace)) {
+            if (cn.equals(namespace)) {
                 graph.get(currentNamespace).setRecursive(true);
             }
             cn = namespace;
-            while (!cn.contains("<root>::Object::") && !cn.equals(currentNamespace)&& !cn.equals("constructor")) {
+            while (!cn.contains("<root>::Object::") && !cn.equals(currentNamespace) && !cn.equals("constructor")) {
                 cn = tos.getParentNamespace(cn);
             }
-            if(cn.equals(currentNamespace)) {
+            if (cn.equals(currentNamespace)) {
                 graph.get(currentNamespace).setRecursive(true);
             }
         }
diff --git a/src/main/java/complexityparser/listeners/TOSBuilder.java b/src/main/java/complexityparser/listeners/TOSBuilder.java
index c7ac62ac19c08d83b379d8faf5f059084090a5f3..2c48bb50e143d7c1c004e28747f2d9605947104b 100644
--- a/src/main/java/complexityparser/listeners/TOSBuilder.java
+++ b/src/main/java/complexityparser/listeners/TOSBuilder.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.listeners;
 
 import complexityparser.types.Tier;
@@ -32,7 +31,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * A basic listener (visitor) exploring the parse tree and filling the TOS with the appropriate symbol id and tiered type.
+ * A basic listener (visitor) exploring the parse tree and filling the TOS with
+ * the appropriate symbol id and tiered type.
  */
 public class TOSBuilder extends JavaParserBaseListener {
 
@@ -54,7 +54,8 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      *
-     * @return a map from parse tree to Integer reprenting the block number associated with each parse tree node.
+     * @return a map from parse tree to Integer reprenting the block number
+     * associated with each parse tree node.
      */
     public ParseTreeProperty<Integer> getBlockNumbers() {
         return blockNumbers;
@@ -62,6 +63,7 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Handles class field declarations.
+     *
      * @param ctx - a field declaration context.
      */
     @Override
@@ -72,7 +74,7 @@ public class TOSBuilder extends JavaParserBaseListener {
         /*
         A field declaration may contain multiple fields, e.g. private int a, b, c;
          */
-        for(int i = 0; i < list.size(); i++) {
+        for (int i = 0; i < list.size(); i++) {
             VariableID id = new VariableID(list.get(i).variableDeclaratorId().getText());
             tos.put(id, t);
         }
@@ -80,21 +82,22 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Handles a block (class blocks are treated differently).
+     *
      * @param ctx - a block context.
      */
     @Override
     public void enterBlock(JavaParser.BlockContext ctx) {
         super.enterBlock(ctx);
-        if(ctx.equals(lastEntered)) {
+        if (ctx.equals(lastEntered)) {
             lastEntered = null;
-        }
-        else {
+        } else {
             tos.enterBlock("<>");
         }
     }
 
     /**
      * Exits a block (class blocks are treated differently).
+     *
      * @param ctx - a block context.
      */
     @Override
@@ -104,7 +107,8 @@ public class TOSBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Sets the default tier to 1 when entering a #init #init block.
+     * Sets the default tier to T1 when entering a #init #init block.
+     *
      * @param ctx - a statement context.
      */
     @Override
@@ -115,6 +119,7 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Sets the default tier to 0 when exiting a #init #init block.
+     *
      * @param ctx - a statement context.
      */
     @Override
@@ -124,7 +129,9 @@ public class TOSBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Associates a block number to an expression call in the #blockNumbers map (mapping ParseTree to Integer).
+     * Associates a block number to an expression call in the block numbers map
+     * (mapping ParseTree to Integer).
+     *
      * @param ctx - an expression call context.
      */
     @Override
@@ -135,13 +142,14 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Handles class declarations.
+     *
      * @param ctx - a class declaration context.
      */
     @Override
     public void enterClassDeclaration(JavaParser.ClassDeclarationContext ctx) {
         super.enterClassDeclaration(ctx);
         String mother = "Object";
-        if(ctx.typeType() != null) {
+        if (ctx.typeType() != null) {
             mother = ctx.typeType().getText();
         }
         String name = ctx.IDENTIFIER().getText();
@@ -151,7 +159,9 @@ public class TOSBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Associates a block number to a method call context in the #blockNumbers map (mapping ParseTree to Integer).
+     * Associates a block number to a method call context in the block numbers
+     * map (mapping ParseTree to Integer).
+     *
      * @param ctx - a method call context.
      */
     @Override
@@ -162,6 +172,7 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Handles constructor declarations.
+     *
      * @param ctx - a constructor declaration context.
      */
     @Override
@@ -175,8 +186,8 @@ public class TOSBuilder extends JavaParserBaseListener {
         Checks for constructor parameters and populate the param list with a string representation of their type
         to create the constructors namespace (that allows us to identify uniquely every constructor).
          */
-        if(ctx.formalParameters().formalParameterList() != null) {
-            for(JavaParser.FormalParameterContext t : ctx.formalParameters().formalParameterList().formalParameter()) {
+        if (ctx.formalParameters().formalParameterList() != null) {
+            for (JavaParser.FormalParameterContext t : ctx.formalParameters().formalParameterList().formalParameter()) {
                 String pName = t.variableDeclaratorId().IDENTIFIER().getText();
                 String pType = t.typeType().getText();
                 param.add(pType);
@@ -184,8 +195,8 @@ public class TOSBuilder extends JavaParserBaseListener {
             }
         }
         /*
-  	The following code associates a block number to the constructor in the #blockNumbers map. 
-        */
+  	The following code associates a block number to the constructor in the block numbers map. 
+         */
         blockNumbers.put(ctx, tos.getCurrentBlock());
         /*
         A method id/tiered type pair is associated to the constructor (constructors are treated as methods).
@@ -195,7 +206,7 @@ public class TOSBuilder extends JavaParserBaseListener {
         /*
         For each parameter, a variable id/tiered type pair is created and added in the tos.
          */
-        for(int i = 0; i < pNames.size(); i++) {
+        for (int i = 0; i < pNames.size(); i++) {
             VariableID id = new VariableID(pNames.get(i));
             VariableTieredType t = new VariableTieredType(Tier.T0, param.get(i));
 
@@ -205,6 +216,7 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Handles method declarations.
+     * 
      * @param ctx - a method declaration context.
      */
     @Override
@@ -216,9 +228,9 @@ public class TOSBuilder extends JavaParserBaseListener {
         /*
         Checks for method parameters and their corresponding type.
          */
-        if(ctx.formalParameters().formalParameterList() != null) {
+        if (ctx.formalParameters().formalParameterList() != null) {
             List<JavaParser.FormalParameterContext> list = ctx.formalParameters().formalParameterList().formalParameter();
-            for(JavaParser.FormalParameterContext p : list) {
+            for (JavaParser.FormalParameterContext p : list) {
                 String pName = p.variableDeclaratorId().IDENTIFIER().getText();
                 params.add(p.typeType().getText());
                 pNames.add(pName);
@@ -238,7 +250,7 @@ public class TOSBuilder extends JavaParserBaseListener {
         /*
         Creates id/tiered types for the method parameters and adds them to the tos.
          */
-        for(int i = 0; i < pNames.size(); i++) {
+        for (int i = 0; i < pNames.size(); i++) {
             VariableID vid = new VariableID(pNames.get(i));
             VariableTieredType vt = new VariableTieredType(Tier.T0, params.get(i));
             tos.put(vid, vt);
@@ -247,6 +259,7 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Exits a class Block.
+     *
      * @param ctx - a class body context.
      */
     @Override
@@ -257,6 +270,7 @@ public class TOSBuilder extends JavaParserBaseListener {
 
     /**
      * Handles a variable declaration context.
+     *
      * @param ctx - a variable declaration context.
      */
     @Override
@@ -267,19 +281,18 @@ public class TOSBuilder extends JavaParserBaseListener {
         The tiered type of a local variable does not need to be specified.
         If the tier is not provided, then the current default value is used.
          */
-        if(ctx.TIER() != null) {
+        if (ctx.TIER() != null) {
             String tier = ctx.TIER().getText();
             tier = tier.substring(1, tier.length() - 1);
             res = Tier.toTier(Integer.valueOf(tier));
-        }
-        else {
+        } else {
             res = defaultTier;
         }
         VariableTieredType t = new VariableTieredType(res, ctx.typeType().getText());
         /*
         A local variable may contain multiple variables, e.g. int a, b = 10, c, d = 21;
          */
-        for(JavaParser.VariableDeclaratorContext var : ctx.variableDeclarators().variableDeclarator()) {
+        for (JavaParser.VariableDeclaratorContext var : ctx.variableDeclarators().variableDeclarator()) {
             String name = var.variableDeclaratorId().getText();
             tos.put(new VariableID(name), t);
         }
@@ -287,8 +300,9 @@ public class TOSBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Associates a block number to a primary expression (see the ANTLR grammar for a definition of primary expressions)
-     * in the #blockNumbers map.
+     * Associates a block number to a primary expression (see the ANTLR grammar
+     * for a definition of primary expressions) in the block numbers map.
+     *
      * @param ctx - an expression primary context.
      */
     @Override
@@ -298,7 +312,8 @@ public class TOSBuilder extends JavaParserBaseListener {
     }
 
     /**
-     * Associates a block number to a node in the #blockNumbers map.
+     * Associates a block number to a node in the block numbers map.
+     *
      * @param ctx - a parser rule context.
      */
     @Override
diff --git a/src/main/java/complexityparser/listeners/TypingListener.java b/src/main/java/complexityparser/listeners/TypingListener.java
index f0ce8d5a3ffa5ffb20708c4cb2c9a152d8290b2b..fa27148833ce4b14e6b12962f088677067b9abe6 100644
--- a/src/main/java/complexityparser/listeners/TypingListener.java
+++ b/src/main/java/complexityparser/listeners/TypingListener.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.listeners;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -28,11 +27,12 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * The TypingListener associates types to expression nodes of the parse tree. 
- * The class and its methods are used to create the namespace of called methods from their caller.
- * Namespaces are used to identify uniquely a method.
+ * The TypingListener associates types to expression nodes of the parse tree.
+ * The class and its methods are used to create the namespace of called methods
+ * from their caller. Namespaces are used to identify uniquely a method.
  */
 public class TypingListener extends JavaParserBaseListener {
+
     private ParseTreeProperty<String> types;
     private ParseTreeProperty<Integer> blockNumbers;
     private TOS tos;
@@ -46,6 +46,7 @@ public class TypingListener extends JavaParserBaseListener {
     public ParseTreeProperty<String> getTypes() {
         return types;
     }
+
     @Override
     public void exitPrimary_literal(JavaParser.Primary_literalContext ctx) {
         super.exitPrimary_literal(ctx);
@@ -63,10 +64,9 @@ public class TypingListener extends JavaParserBaseListener {
         super.exitPrimary_identifier(ctx);
         VariableID id = new VariableID(ctx.IDENTIFIER().getText());
         TieredType t = tos.find(id, blockNumbers.get(ctx));
-        if(t != null) {
+        if (t != null) {
             types.put(ctx, t.getType());
-        }
-        else {
+        } else {
             types.put(ctx, "unknown");
         }
     }
@@ -81,12 +81,13 @@ public class TypingListener extends JavaParserBaseListener {
 
     /**
      * @param op - a String encoding an operator symbol.
-     * @return true if the string encodes an operator that returns a boolean value.
+     * @return true if the string encodes an operator that returns a boolean
+     * value.
      */
     private boolean isBooleanOperator(String op) {
         String[] booleanOperators = {"<", ">", ">=", "<=", "||", "&&"};
         boolean res = false;
-        for(int i = 0; i < booleanOperators.length && !res; i++) {
+        for (int i = 0; i < booleanOperators.length && !res; i++) {
             res = booleanOperators[i].equals(op);
         }
         return res;
@@ -95,10 +96,9 @@ public class TypingListener extends JavaParserBaseListener {
     @Override
     public void exitExpression_operation(JavaParser.Expression_operationContext ctx) {
         super.exitExpression_operation(ctx);
-        if(isBooleanOperator(ctx.bop.getText())) {
+        if (isBooleanOperator(ctx.bop.getText())) {
             types.put(ctx, "boolean");
-        }
-        else {
+        } else {
             types.put(ctx, types.get(ctx.expression(0)));
         }
     }
@@ -113,17 +113,15 @@ public class TypingListener extends JavaParserBaseListener {
         ArrayList<String> param = new ArrayList<>();
         String name = ctx.methodCall().IDENTIFIER().getText();
         String type;
-        if(ctx.expression() != null) {
+        if (ctx.expression() != null) {
             type = types.get(ctx.expression());
-        }
-        else {
+        } else {
             int no = blockNumbers.get(ctx);
             type = tos.getClassName(no);
         }
-        if(name.equals("clone")) {
+        if (name.equals("clone")) {
             types.put(ctx, type);
-        }
-        else {
+        } else {
             if (ctx.methodCall().expressionList() != null) {
                 List<JavaParser.ExpressionContext> list = ctx.methodCall().expressionList().expression();
                 for (JavaParser.ExpressionContext e : list) {
@@ -131,12 +129,12 @@ public class TypingListener extends JavaParserBaseListener {
                     param.add(t);
                 }
             }
-	   /*
+            /*
            The method namespace is built in the TOS.
-           */
+             */
             String namespace = TOS.buildMethodNamespace(param, type, name);
             MethodTieredType mt = tos.findMethodTieredTypeByNamespace(namespace);
-            if(mt != null) {
+            if (mt != null) {
                 /*
                 If the method tiered type has been found, then its Java return type is
                 added in the attribute types.
@@ -154,7 +152,7 @@ public class TypingListener extends JavaParserBaseListener {
         String name = ctx.IDENTIFIER().getText();
         VariableID id = new VariableID(name);
         VariableTieredType t = (VariableTieredType) tos.find(id, no);
-        if(t != null) {
+        if (t != null) {
             types.put(ctx, t.getType());
         }
     }
@@ -188,4 +186,4 @@ public class TypingListener extends JavaParserBaseListener {
         super.exitExpression_unary(ctx);
         types.put(ctx, types.get(ctx.expression()));
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/TOS.java b/src/main/java/complexityparser/tos/TOS.java
index 35d80217d65cf6cd91d5cf17b20a4bd63ee34122..878f47f2474b50c274f5e536c721d80143a65698 100644
--- a/src/main/java/complexityparser/tos/TOS.java
+++ b/src/main/java/complexityparser/tos/TOS.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -50,7 +49,7 @@ public class TOS {
      * @return the singleton instance tos.
      */
     public static TOS getInstance() {
-        if(tos == null) {
+        if (tos == null) {
             tos = new TOS();
         }
         return tos;
@@ -73,6 +72,7 @@ public class TOS {
 
     /**
      * Enters a new block in the tos.
+     *
      * @param name - the name of the block.
      */
     public void enterBlock(String name) {
@@ -82,11 +82,12 @@ public class TOS {
 
     /**
      * Sets the current block to a new class block.
+     *
      * @param name - the name of the block.
      * @param parent - the parent of the block.
      */
     public void enterClass(String name, String parent) {
-        if(currentBlock != 0) {
+        if (currentBlock != 0) {
             err.println("Cannot create class in another block than <root>");
             return;
         }
@@ -96,6 +97,7 @@ public class TOS {
 
     /**
      * Sets the current block to a new method (body) block
+     *
      * @param name - the name of the method block.
      * @param param - the list of parameter names.
      */
@@ -129,9 +131,10 @@ public class TOS {
     }
 
     /**
-     * Adds a new entry into the current block.
-     * Every ID has to be unique inside the current block.
-     * No check is done before or after inserting the ID so if an ID is redefined it will be overwritten without any warning.
+     * Adds a new entry into the current block. Every ID has to be unique inside
+     * the current block. No check is done before or after inserting the ID so
+     * if an ID is redefined it will be overwritten without any warning.
+     *
      * @param i - the identifier of the entry.
      * @param t - the tiered type of the entry.
      */
@@ -140,13 +143,14 @@ public class TOS {
     }
 
     /**
-     * Adds a class id and a tiered type in the current block.
-     * If it already exists the previous tiered type is overriden.
+     * Adds a class id and a tiered type in the current block. If it already
+     * exists the previous tiered type is overriden.
+     *
      * @param i - a class ID.
      * @param t - a class tiered type.
      */
     public void put(ClassID i, ClassTieredType t) {
-        if(currentBlock != 0) {
+        if (currentBlock != 0) {
             err.println("Cannot create class in another block than <root>");
             return;
         }
@@ -170,7 +174,7 @@ public class TOS {
         StringBuilder str = new StringBuilder();
         while (no != -1) {
             str.insert(0, array.get(no).getBlockName());
-            if(no != 0) {
+            if (no != 0) {
                 str.insert(0, "::");
             }
             no = array.get(no).getNoParent();
@@ -182,14 +186,15 @@ public class TOS {
      *
      * @param i - an ID.
      * @param noBloc - a number representing a block index.
-     * @return a tiered type associated with the given id #i inside the block of index #noBloc (or one of its parent blocks).
+     * @return a tiered type associated with the specified id inside the block of
+     * index noBloc (or one of its parent blocks).
      */
     public TieredType find(ID i, int noBloc) {
         TieredType res = null;
         while (res == null && noBloc != -1) {
             Block b = array.get(noBloc);
             res = b.get(i);
-            if(res == null) {
+            if (res == null) {
                 /*
                 If the current block is a class and the tiered type has not been found
                 (since classes cannot be declared inside other classes) then the parent block is necessarily
@@ -197,20 +202,19 @@ public class TOS {
 		Moreover it also means that it is time to start looking
                 in the parent classes of the current class because fields are inherited.
                  */
-                if(b.getNoParent() != -1 && b instanceof ClassBlock) {
+                if (b.getNoParent() != -1 && b instanceof ClassBlock) {
                     String parent = ((ClassBlock) b).getMother();
                     int j;
-                    for(j = 0; j < array.size(); j++) {
-                        if(array.get(j).getBlockName().equals(parent)) {
+                    for (j = 0; j < array.size(); j++) {
+                        if (array.get(j).getBlockName().equals(parent)) {
                             noBloc = j;
                             break;
                         }
                     }
-                    if(j == array.size()) {
+                    if (j == array.size()) {
                         noBloc = b.getNoParent();
                     }
-                }
-                else {
+                } else {
                     noBloc = b.getNoParent();
                 }
             }
@@ -224,8 +228,8 @@ public class TOS {
      * @return the name of the parent class for the given namespace.
      */
     public String getMotherByName(String str) {
-        for(Block b : array) {
-            if(b.getName().equals(str)) {
+        for (Block b : array) {
+            if (b.getName().equals(str)) {
                 return b.getMother();
             }
         }
@@ -235,22 +239,24 @@ public class TOS {
     /**
      *
      * @param namespace - a namespace.
-     * @return the namespace associated to the superclass of the class of the parameter namespace. 
-	If it corresponds to a method the namespace of the overridden method is returned.
+     * @return the namespace associated to the superclass of the class of the
+     * parameter namespace. If it corresponds to a method the namespace of the
+     * overridden method is returned.
      */
     public String getParentNamespace(String namespace) {
         String[] names = namespace.split("::");
-        if(names.length != 3) {
+        if (names.length != 3) {
             return "";
         }
-       names[1] = getMotherByName(names[1]);
-       return names[0] + "::" + names[1] + "::" + names[2];
+        names[1] = getMotherByName(names[1]);
+        return names[0] + "::" + names[1] + "::" + names[2];
     }
 
     /**
      *
      * @param namespace - a namespace.
-     * @return the namespace of a method that is at the root of the class hierarchy.
+     * @return the namespace of a method that is at the root of the class
+     * hierarchy.
      */
     public String getRootNamespace(String namespace) {
         String res = namespace;
@@ -264,14 +270,15 @@ public class TOS {
     /**
      *
      * @param namespace - a namespace.
-     * @return the namespaces of all the hypothetically overridden methods contained in the children of the class 
-     * (with the method name contained in the given namespace).
+     * @return the namespaces of all the hypothetically overridden methods
+     * contained in the children of the class (with the method name contained in
+     * the given namespace).
      */
     public String[] getChildrenNamespaces(String namespace) {
         String[] names = namespace.split("::");
         ArrayList<String> res = new ArrayList<>();
-        for(Block b : array) {
-            if(b.getMother().equals(names[1])) {
+        for (Block b : array) {
+            if (b.getMother().equals(names[1])) {
                 String tmp = "<root>::" + b.getName() + "::" + names[2];
                 res.add(tmp);
             }
@@ -287,16 +294,15 @@ public class TOS {
     public MethodTieredType findMethodTieredTypeByNamespace(String namespace) {
         MethodTieredType res = null;
         String[] names = namespace.split("::");
-        if(names.length != 3) {
+        if (names.length != 3) {
             return null;
         }
-        for(Block b : array) {
-            if(b.getBlockName().equals(names[1])) {
+        for (Block b : array) {
+            if (b.getBlockName().equals(names[1])) {
                 MethodTieredType t = b.findMethodTieredTypeByNamespace(names[2]);
-                if(t != null) {
+                if (t != null) {
                     return t;
-                }
-                else {
+                } else {
                     namespace = "<root>::" + b.getMother() + "::" + names[2];
                     return findMethodTieredTypeByNamespace(namespace);
                 }
@@ -314,32 +320,29 @@ public class TOS {
         Stack<Pair> stack = new Stack<>();
         stack.push(new Pair(array.get(0), 0));
         String prefix = "";
-        while (! stack.empty()) {
+        while (!stack.empty()) {
             Pair p = stack.peek();
-            if(p.b.getNo() == p.index) {
+            if (p.b.getNo() == p.index) {
                 str.append(prefix + p.b.getBlockName() + " {\n");
                 prefix = "   " + prefix;
-                for(Map.Entry<ID, TieredType> entry : p.b.getMap()) {
+                for (Map.Entry<ID, TieredType> entry : p.b.getMap()) {
                     str.append(prefix);
                     str.append(entry.getKey() + " -> " + entry.getValue() + "\n");
                 }
                 p.index++;
-            }
-            else if(p.index >= array.size()) {
+            } else if (p.index >= array.size()) {
                 prefix = prefix.substring(0, prefix.length() - 3);
                 str.append(prefix + "}\n");
                 stack.pop();
-            }
-            else {
+            } else {
                 while (p.index < array.size() && p.b.getNo() != array.get(p.index).getNoParent()) {
                     p.index++;
                 }
-                if(p.index >= array.size()) {
+                if (p.index >= array.size()) {
                     prefix = prefix.substring(0, prefix.length() - 3);
                     str.append(prefix + "}\n");
                     stack.pop();
-                }
-                else {
+                } else {
                     Block tmp = array.get(p.index);
                     stack.push(new Pair(tmp, tmp.getNo()));
                 }
@@ -357,8 +360,10 @@ public class TOS {
      * A simple inner class used in the toString method.
      */
     private class Pair {
+
         public Block b;
         public int index;
+
         public Pair(Block b, int index) {
             this.b = b;
             this.index = index;
@@ -369,7 +374,8 @@ public class TOS {
      *
      * @param params - a list of parameter names.
      * @param names - several class and method names.
-     * @return the namespace that can be created with the given method parameters and the class names and method names given as parameter.
+     * @return the namespace that can be created with the given method
+     * parameters and the class names and method names given as parameter.
      */
     public static String buildMethodNamespace(ArrayList<String> params, String... names) {
         String[] tmp = new String[names.length + 1];
@@ -382,14 +388,15 @@ public class TOS {
      *
      * @param ctx - a declaration context.
      * @param block - the index of a block.
-     * @return builds the namespace of a method using its parse tree and a block number (for the given node).
+     * @return builds the namespace of a method using its parse tree and a block
+     * number (for the given node).
      */
     public String getMethodNamespace(JavaParser.MethodDeclarationContext ctx, int block) {
         ArrayList<String> params = new ArrayList<>();
         String name = ctx.IDENTIFIER().getText();
-        if(ctx.formalParameters().formalParameterList() != null) {
+        if (ctx.formalParameters().formalParameterList() != null) {
             List<JavaParser.FormalParameterContext> list = ctx.formalParameters().formalParameterList().formalParameter();
-            for(JavaParser.FormalParameterContext p : list) {
+            for (JavaParser.FormalParameterContext p : list) {
                 params.add(p.typeType().getText());
             }
         }
@@ -403,9 +410,9 @@ public class TOS {
     public String getConstructorNamespace(JavaParser.ConstructorDeclarationContext ctx, int block) {
         ArrayList<String> params = new ArrayList<>();
         String name = ctx.IDENTIFIER().getText();
-        if(ctx.formalParameters().formalParameterList() != null) {
+        if (ctx.formalParameters().formalParameterList() != null) {
             List<JavaParser.FormalParameterContext> list = ctx.formalParameters().formalParameterList().formalParameter();
-            for(JavaParser.FormalParameterContext p : list) {
+            for (JavaParser.FormalParameterContext p : list) {
                 params.add(p.typeType().getText());
             }
         }
@@ -419,10 +426,10 @@ public class TOS {
     /**
      *
      * @param no - an index.
-     * @return the parent class block number of the block number of index #no.
+     * @return the parent class block number of the block number of the specified index.
      */
     public int getClassBlockNumber(int no) {
-        while (no != -1 && !(array.get(no) instanceof  ClassBlock)) {
+        while (no != -1 && !(array.get(no) instanceof ClassBlock)) {
             no = array.get(no).getNoParent();
         }
         return no;
@@ -431,18 +438,18 @@ public class TOS {
     /**
      *
      * @param no - an index.
-     * @return the number of the parent class for the block number #no.
+     * @return the number of the parent class for the block number corresponding to the specified index.
      */
     public int getMotherClassNumber(int no) {
-        if(no == -1) {
+        if (no == -1) {
             return no;
         }
         no = getClassBlockNumber(no);
 
         ClassBlock b = (ClassBlock) array.get(no);
         String mother = b.getMother();
-        for(int i = 0; i < array.size(); i++) {
-            if(array.get(i).getName().equals(mother)) {
+        for (int i = 0; i < array.size(); i++) {
+            if (array.get(i).getName().equals(mother)) {
                 return i;
             }
         }
@@ -453,14 +460,15 @@ public class TOS {
      *
      * @param no - an index.
      * @param cl - an index.
-     * @return true if the block of number #no is contained inside the class block #cl.
+     * @return true if the block of number of index no is contained inside the class
+     * block of index cl.
      */
     public boolean isBlockInClass(int no, int cl) {
-        if(no == -1) {
+        if (no == -1) {
             return false;
         }
         no = getClassBlockNumber(no);
-        if(no == cl) {
+        if (no == cl) {
             return true;
         }
         return isBlockInClass(getMotherClassNumber(no), cl);
@@ -469,12 +477,12 @@ public class TOS {
     /**
      *
      * @param no - an index.
-     * @return the name of the class identified by the block number #no.
+     * @return the name of the class identified by the block number of index no.
      */
     public String getClassName(int no) {
         String res = "";
         no = getClassBlockNumber(no);
-        if(no != -1) {
+        if (no != -1) {
             res = array.get(no).getBlockName();
         }
         return res;
@@ -484,24 +492,25 @@ public class TOS {
      *
      * @param params - a list of parameter names.
      * @param names - several names.
-     * @return a string containing the namespace given by the names array appended with the given method parameters
+     * @return a string containing the namespace given by the names array
+     * appended with the given method parameters
      */
     public static String appendToNamespace(ArrayList<String> params, String... names) {
         StringBuilder res = new StringBuilder();
-        for(int i = 0; i < names.length; i++) {
+        for (int i = 0; i < names.length; i++) {
             res.append(names[i]);
-            if(i < names.length - 1) {
+            if (i < names.length - 1) {
                 res.append("::");
             }
         }
         res.append("(");
-        for(int i = 0; i < params.size(); i++) {
+        for (int i = 0; i < params.size(); i++) {
             res.append(params.get(i));
-            if(i < params.size() - 1) {
+            if (i < params.size() - 1) {
                 res.append(", ");
             }
         }
         res.append(")");
         return res.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/blocks/Block.java b/src/main/java/complexityparser/tos/blocks/Block.java
index 6eff7f1564ec3d3203901148982da53d2953187d..01004469bc6bb31b21516f0da5a97aa5ea661a25 100644
--- a/src/main/java/complexityparser/tos/blocks/Block.java
+++ b/src/main/java/complexityparser/tos/blocks/Block.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.blocks;
 
 import complexityparser.tos.TOS;
@@ -25,14 +24,13 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * A class representing a block and containing:
- *     - the name of the block,
- *     - the index no of the block,
- *     - the parent index noParent of the block,
- *     - a hashmap symbols containing every (ID, TieredType) entry (ID has to be unique).
- * This class should not be instanciated outside of the TOS class.
+ * A class representing a block and containing: - the name of the block, - the
+ * index no of the block, - the parent index noParent of the block, - a hashmap
+ * symbols containing every (ID, TieredType) entry (ID has to be unique). This
+ * class should not be instanciated outside of the TOS class.
  */
 public class Block {
+
     private String name;
     private int no;
     private int noParent;
@@ -54,6 +52,7 @@ public class Block {
 
     /**
      * Adds an entry to a block.
+     *
      * @param i - an ID.
      * @param t - a tiered type.
      */
@@ -92,7 +91,8 @@ public class Block {
 
     /**
      *
-     * @return the name of the parent class (makes no sense on anonym blocks or methods).
+     * @return the name of the parent class (makes no sense on anonym blocks or
+     * methods).
      */
     public String getMother() {
         return "Object";
@@ -107,8 +107,8 @@ public class Block {
     }
 
     public MethodTieredType findMethodTieredTypeByNamespace(String name) {
-        for(Map.Entry<ID, TieredType> e : symbols.entrySet()) {
-            if(e.getKey().getName().equals(name)) {
+        for (Map.Entry<ID, TieredType> e : symbols.entrySet()) {
+            if (e.getKey().getName().equals(name)) {
                 return (MethodTieredType) e.getValue();
             }
         }
@@ -122,4 +122,4 @@ public class Block {
     public Set<Map.Entry<ID, TieredType>> getMap() {
         return symbols.entrySet();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/blocks/ClassBlock.java b/src/main/java/complexityparser/tos/blocks/ClassBlock.java
index 8fae597cf57b7125bdd4d7dc08e6e5274bef28d9..c4339d864323a62d951e7e6cd038cfbd179a2271 100644
--- a/src/main/java/complexityparser/tos/blocks/ClassBlock.java
+++ b/src/main/java/complexityparser/tos/blocks/ClassBlock.java
@@ -12,15 +12,16 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.blocks;
 
 /**
  * A block representation for classes.
  */
 public class ClassBlock extends Block {
+
     private String mother;
+
     public ClassBlock(String name, String mother) {
         super(name);
         this.mother = mother;
@@ -30,4 +31,4 @@ public class ClassBlock extends Block {
     public String getMother() {
         return mother;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/blocks/MethodBlock.java b/src/main/java/complexityparser/tos/blocks/MethodBlock.java
index a0db011abc8860eda2b6cbfd69328bd1b6507336..241a9696c4d346c32e0fee2da09933e37b99e1e4 100644
--- a/src/main/java/complexityparser/tos/blocks/MethodBlock.java
+++ b/src/main/java/complexityparser/tos/blocks/MethodBlock.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.blocks;
 
 import java.util.ArrayList;
@@ -37,4 +36,4 @@ public class MethodBlock extends Block {
         param.setCharAt(param.length() - 1, ')');
         return getName() + param;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/id/ClassID.java b/src/main/java/complexityparser/tos/id/ClassID.java
index f8fe4cead608c3ebedc973dc699786182d98a98c..f0b9201aee97e66d90c453b94adf493c9acbc111 100644
--- a/src/main/java/complexityparser/tos/id/ClassID.java
+++ b/src/main/java/complexityparser/tos/id/ClassID.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.id;
 
 public class ClassID extends ID {
@@ -24,10 +23,10 @@ public class ClassID extends ID {
 
     @Override
     public String toString() {
-        StringBuilder str= new StringBuilder();
+        StringBuilder str = new StringBuilder();
         str.append("ClassID { name ='");
         str.append(getName());
         str.append("' }");
         return str.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/id/ID.java b/src/main/java/complexityparser/tos/id/ID.java
index d8720c0f3c4898e24574013822b2320329728ba9..7195484396e6b46e88debbc947845d9727b81ac8 100644
--- a/src/main/java/complexityparser/tos/id/ID.java
+++ b/src/main/java/complexityparser/tos/id/ID.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.id;
 
 import java.util.Objects;
@@ -22,6 +21,7 @@ import java.util.Objects;
  * An abstract class for representing an ID.
  */
 public abstract class ID {
+
     private String name;
 
     public ID(String name) {
@@ -38,15 +38,19 @@ public abstract class ID {
 
     @Override
     public String toString() {
-        return "ID { " +
-                "name = '" + name + "\' " +
-                '}';
+        return "ID { "
+                + "name = '" + name + "\' "
+                + '}';
     }
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
         ID id = (ID) o;
         return Objects.equals(name, id.name);
     }
@@ -55,4 +59,4 @@ public abstract class ID {
     public int hashCode() {
         return Objects.hash(name);
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/id/MethodID.java b/src/main/java/complexityparser/tos/id/MethodID.java
index c33b8e32d2c9a9a02e148903e831746cf504f195..70fe7aa6c1c68cea6f219016064b658e27300189 100644
--- a/src/main/java/complexityparser/tos/id/MethodID.java
+++ b/src/main/java/complexityparser/tos/id/MethodID.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.id;
 
 import java.util.ArrayList;
@@ -30,9 +29,15 @@ public class MethodID extends ID {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        if (!super.equals(o)) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+        if (!super.equals(o)) {
+            return false;
+        }
         MethodID methodID = (MethodID) o;
         return Objects.equals(param, methodID.param);
     }
@@ -49,10 +54,10 @@ public class MethodID extends ID {
         str.append(super.getName());
         str.append("(");
 
-        for(int i = 0; i < param.size(); i++) {
+        for (int i = 0; i < param.size(); i++) {
             str.append(param.get(i));
 
-            if(i < param.size() - 1) {
+            if (i < param.size() - 1) {
                 str.append(", ");
             }
         }
@@ -73,4 +78,4 @@ public class MethodID extends ID {
         str.append("' }");
         return str.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/tos/id/VariableID.java b/src/main/java/complexityparser/tos/id/VariableID.java
index 96cbe8befab8dc92e552da218c5fa5cb1c0498d4..b7c2b8a78c521a1a6dc19ec68ee049af1d087611 100644
--- a/src/main/java/complexityparser/tos/id/VariableID.java
+++ b/src/main/java/complexityparser/tos/id/VariableID.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.tos.id;
 
 /**
@@ -24,4 +23,4 @@ public class VariableID extends ID {
     public VariableID(String name) {
         super(name);
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/FOTier.java b/src/main/java/complexityparser/types/FOTier.java
index 53891404203e81ff7145a7ed626f5ea923548f7a..9de0824f20a1a1034b72b7b274642cae7154e87a 100644
--- a/src/main/java/complexityparser/types/FOTier.java
+++ b/src/main/java/complexityparser/types/FOTier.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types;
 
 import lib.Mask;
@@ -21,12 +20,15 @@ import java.util.Arrays;
 import java.util.Objects;
 
 public class FOTier {
+
     private Tier[] in;
-    private Tier out; 
-    private Tier env; 
+    private Tier out;
+    private Tier env;
 
     /**
-     * Class for encoding the First Order Tier of operators, constructors, and methods.
+     * Class for encoding the First Order Tier of operators, constructors, and
+     * methods.
+     *
      * @param out - the output tier.
      * @param in - the input tiers.
      */
@@ -34,10 +36,11 @@ public class FOTier {
         this.in = in;
         this.out = out;
     }
+
     public FOTier(Tier out, Tier env, Tier... in) {
-	this.in = in;
+        this.in = in;
         this.out = out;
-	this.env = env;
+        this.env = env;
     }
 
     public FOTier() {
@@ -61,6 +64,7 @@ public class FOTier {
 
     /**
      * Sets the output tier.
+     *
      * @param out - a tier.
      */
     public void setOut(Tier out) {
@@ -77,6 +81,7 @@ public class FOTier {
 
     /**
      * Sets the environment tier.
+     *
      * @param env - a tier.
      */
     public void setEnv(Tier env) {
@@ -94,26 +99,27 @@ public class FOTier {
 
     /**
      *
-     * @param m - a mask representing 'compatible' values (true) and 'equal' values (false).
+     * @param m - a mask representing 'compatible' values (true) and 'equal'
+     * values (false).
      * @param in - input tiers.
-     * @return true if the operator input tiers are compatible with the parameter tiers and respect the parameter mask.
+     * @return true if the operator input tiers are compatible with the
+     * parameter tiers and respect the parameter mask.
      */
     public boolean isCompatibleWith(Mask m, Tier... in) {
-        if(in.length != this.in.length) {
+        if (in.length != this.in.length) {
             return false;
         }
-        for(int i = 0; i < in.length; i++) {
-            if(m.get(i)) {
+        for (int i = 0; i < in.length; i++) {
+            if (m.get(i)) {
                 //If compatibility is possible, then the given input needs to be 
-		//the maximum of the input tiers and the operator input tiers
+                //the maximum of the input tiers and the operator input tiers
                 //(this applies mostly to primitive types).
                 if (Tier.max(in[i], this.in[i]) != in[i]) {
                     return false;
                 }
-            }
-            else {
+            } else {
                 //otherwise the values must be equal (this applies mostly to reference types).
-                if(in[i] != this.in[i]) {
+                if (in[i] != this.in[i]) {
                     return false;
                 }
             }
@@ -136,11 +142,15 @@ public class FOTier {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
         FOTier output = (FOTier) o;
-        return out == output.out &&
-                env == output.env;
+        return out == output.out
+                && env == output.env;
     }
 
     @Override
@@ -148,5 +158,4 @@ public class FOTier {
         return Objects.hash(out, env);
     }
 
-
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/FOTierList.java b/src/main/java/complexityparser/types/FOTierList.java
index b9b1f0eb899b06fce80a03ffc42aa02d127fdc35..e1425921ce6c8a5899b8ce3dc630127c19c185dd 100644
--- a/src/main/java/complexityparser/types/FOTierList.java
+++ b/src/main/java/complexityparser/types/FOTierList.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types;
 
 import lib.Mask;
@@ -23,22 +22,22 @@ import java.util.Arrays;
 import java.util.HashMap;
 import complexityparser.types.env.TypingEnv;
 
+/**
+ * Represents the list of admissible first order tiers (FOTier) of an operator,
+ * constructor, or method. The boolean primitiveReturnType is true if the
+ * return type is a primitive type and false if it is a reference type.
+ */
+public class FOTierList extends ArrayList<FOTier> {
 
-    /**
-     * Represents the list of admissible first order tiers (FOTier) of an operator, constructor, or method.
-     * The boolean #primitiveReturnType is true if the return type is a primitive type and false if it is a reference type.      
-     */
-public class FOTierList extends ArrayList<FOTier>{
     private int arity;
     private boolean primitiveReturnType;
 
-  /**
-     * Creates a new FOTierList.
-     * Empty by default.
-     * The arity being fixed to -1 indicating that the FOTierList has not been set yet.
+    /**
+     * Creates a new FOTierList. Empty by default. The arity being fixed to -1
+     * indicating that the FOTierList has not been set yet.
      */
     public FOTierList(boolean primitiveReturnType) {
-	super();
+        super();
         arity = -1;
         this.primitiveReturnType = primitiveReturnType;
     }
@@ -52,32 +51,35 @@ public class FOTierList extends ArrayList<FOTier>{
     }
 
     /**
-     * Adds a FOTier to the current FOTierList and sets the arity (or checks for a coherent arity).
+     * Adds a FOTier to the current FOTierList and sets the arity (or checks for
+     * a coherent arity).
+     *
      * @param out - the output tier .
      * @param env - the environment tier.
-     * @param  in - the input tiers.
+     * @param in - the input tiers.
      * @throws IOException
      */
     public void add(Tier out, Tier env, Tier... in) throws IOException {
-        if(arity == -1) {
+        if (arity == -1) {
             arity = in.length;
         }
-        if(arity != in.length) {
+        if (arity != in.length) {
             //If the cardinality of the input tiers given as paramater is distinct 
-	    //from the FOTierList arity then an exception is thrown.
+            //from the FOTierList arity then an exception is thrown.
             throw new IOException("FOTierList::addObserver input of wrong size expected " + arity + " got " + in.length);
         }
-        add(new FOTier(out,env,in));
+        add(new FOTier(out, env, in));
     }
 
     /**
      *
      * @param in - input tiers.
-     * @return the (first) FOTier matching the given input tiers #in and (NONE, NONE), if no match is found.
+     * @return the (first) FOTier matching the given input tiers in and a default FOTier 
+     * of output tier None, if no match is found.
      */
     public FOTier findRes(Tier... in) {
-        for(FOTier i : this) {
-            if(i.contains(in)) {
+        for (FOTier i : this) {
+            if (i.contains(in)) {
                 return i;
             }
         }
@@ -88,14 +90,15 @@ public class FOTierList extends ArrayList<FOTier>{
      *
      * @param m - a mask.
      * @param in - input tiers.
-     * @return a compatible FOTier marching the input tiers #in and the mask #m, (NONE, NONE) if no match is found.
+     * @return a compatible FOTier marching the input tiers in and the mask,
+     * a default FOTier of output tier None if no match is found.
      */
     public FOTier findCompatibleRes(Mask m, Tier... in) {
-        for(FOTier i : this) {
-            if(i.isCompatibleWith(m, in)) {
+        for (FOTier i : this) {
+            if (i.isCompatibleWith(m, in)) {
                 //The array is deep copied to avoid any unwanted side effect
                 //and to provide another possible returned value 
-		//(the current input tiers instead of the parameter input tiers, both being compatible).
+                //(the current input tiers instead of the parameter input tiers, both being compatible).
                 System.arraycopy(i.getIn(), 0, in, 0, in.length);
                 return i;
             }
@@ -107,12 +110,13 @@ public class FOTierList extends ArrayList<FOTier>{
      *
      * @param m - a mask.
      * @param in - input tiers.
-     * @return  an array of FOTiers of the FOTierList compatible with the input parameter.
+     * @return an array of FOTiers of the FOTierList compatible with the input
+     * parameter.
      */
     public FOTier[] findAllCompatibles(Mask m, Tier... in) {
         ArrayList<FOTier> res = new ArrayList<>(this.size());
-        for(FOTier i : this) {
-            if(i.isCompatibleWith(m, in)) {
+        for (FOTier i : this) {
+            if (i.isCompatibleWith(m, in)) {
                 res.add(i);
             }
         }
@@ -122,11 +126,11 @@ public class FOTierList extends ArrayList<FOTier>{
     @Override
     public String toString() {
         StringBuilder str = new StringBuilder();
-        for(FOTier i : this) {
+        for (FOTier i : this) {
             str.append("\t");
             str.append(i);
             str.append(";\n");
         }
         return str.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/Tier.java b/src/main/java/complexityparser/types/Tier.java
index 0ed0a3903419d691076369961952f65ee409c23d..b3e83ee0eb751bcaf9cae05833bf1cf318520ae4 100644
--- a/src/main/java/complexityparser/types/Tier.java
+++ b/src/main/java/complexityparser/types/Tier.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types;
 
 /**
@@ -22,13 +21,12 @@ package complexityparser.types;
 public enum Tier {
     None,
     T0,
-    T1,
-    ;
+    T1,;
 
     /**
      *
      * @param n - an integer.
-     * @return a tier created from the integer n.
+     * @return a tier created from the specified integer.
      */
     public static Tier toTier(int n) {
         switch (n) {
@@ -44,18 +42,19 @@ public enum Tier {
     /**
      *
      * @param t - several tiers.
-     * @return the minimum of the tiers under the precedence NONE &lt; T0 &lt; T1.
+     * @return the minimum of the tiers under the precedence NONE &lt; T0 &lt;
+     * T1.
      */
     public static Tier min(Tier... t) {
-        if(t.length == 0) {
+        if (t.length == 0) {
             return Tier.None;
         }
         Tier res = t[0];
-        for(int i = 0; i < t.length; i++) {
-            if(t[i] == null || t[i] == Tier.None) {
+        for (int i = 0; i < t.length; i++) {
+            if (t[i] == null || t[i] == Tier.None) {
                 return Tier.None;
             }
-            if(res.toNum() > t[i].toNum()) {
+            if (res.toNum() > t[i].toNum()) {
                 res = t[i];
             }
         }
@@ -65,18 +64,19 @@ public enum Tier {
     /**
      *
      * @param t - several tiers.
-     * @return the maximum of the given tiers under the precedence T0 &lt; T1 &lt; NONE.
+     * @return the maximum of the given tiers under the precedence T0 &lt; T1
+     * &lt; NONE.
      */
     public static Tier max(Tier... t) {
-        if(t.length == 0) {
+        if (t.length == 0) {
             return Tier.None;
         }
         Tier res = t[0];
-        for(int i = 0; i < t.length; i++) {
-            if(t[i] == null || t[i] == Tier.None) {
+        for (int i = 0; i < t.length; i++) {
+            if (t[i] == null || t[i] == Tier.None) {
                 return Tier.None;
             }
-            if(res.toNum() < t[i].toNum()) {
+            if (res.toNum() < t[i].toNum()) {
                 res = t[i];
             }
         }
@@ -99,8 +99,9 @@ public enum Tier {
     }
 
     /**
-     * This method is used to declassify tier types in the statement_declass visitor.
-     * This method must be modified if the Tier enum is modified.
+     * This method is used to declassify tier types in the statement_declass
+     * visitor. This method must be modified if the Tier enum is modified.
+     *
      * @return the negation over tiers.
      */
     public Tier next() {
@@ -134,9 +135,9 @@ public enum Tier {
 
     @Override
     public String toString() {
-        if(this == None) {
+        if (this == None) {
             return "None";
         }
         return "" + toNum();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/TierArray.java b/src/main/java/complexityparser/types/TierArray.java
index 8f197fc4f86178f1848d6c0c9e2aacb2d903e820..44145857a8d429830119d68f1cd20d6547766557 100644
--- a/src/main/java/complexityparser/types/TierArray.java
+++ b/src/main/java/complexityparser/types/TierArray.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types;
 
 import java.util.Arrays;
@@ -22,17 +21,20 @@ import java.util.Arrays;
  * A simple array containing tiers.
  */
 public class TierArray {
+
     private Tier[] array;
 
     public TierArray(int size) {
         array = new Tier[size];
-        for(int i = 0; i < size; i++) {
+        for (int i = 0; i < size; i++) {
             array[i] = Tier.T0;
         }
     }
 
     /**
-     * Sets the value at index i to tier v in the array (no checks are done on the index).
+     * Sets the value at index i to tier v in the array (no checks are done on
+     * the index).
+     *
      * @param i - an index.
      * @param v - a tier.
      */
@@ -69,7 +71,7 @@ public class TierArray {
      * Computes the bitwise negation.
      */
     public void increment() {
-        for(int i = 0; i < size(); i++) {
+        for (int i = 0; i < size(); i++) {
             switch (get(i)) {
                 case T0:
                     set(i, Tier.T1);
diff --git a/src/main/java/complexityparser/types/env/OperatorTypingEnvBuilder.java b/src/main/java/complexityparser/types/env/OperatorTypingEnvBuilder.java
index 5f858e05c9897bafaa61d60539e11859bb1fd497..0e274b3e50c662b67151174b82c683db11d15078 100644
--- a/src/main/java/complexityparser/types/env/OperatorTypingEnvBuilder.java
+++ b/src/main/java/complexityparser/types/env/OperatorTypingEnvBuilder.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types.env;
 
 import org.antlr.v4.runtime.tree.TerminalNode;
@@ -24,8 +23,8 @@ import complexityparser.types.FOTier;
 import complexityparser.types.FOTierList;
 
 /**
- * This class is only used to load the configuration file operators.config containing a description (FOTierList) of 
- * the operators admissible FOTiers.
+ * This class is only used to load the configuration file operators.config
+ * containing a description (FOTierList) of the operators admissible FOTiers.
  */
 public class OperatorTypingEnvBuilder extends OperatorsBaseListener {
 
@@ -37,13 +36,14 @@ public class OperatorTypingEnvBuilder extends OperatorsBaseListener {
     }
 
     /**
-     * Creates a new FOTierList, updates the attribute #latest, and
-     * adds the new object with the operator (or method) name to the TypingEnv #te.
+     * Creates a new FOTierList, updates the attribute latest, and adds the new
+     * object with the operator (or method) name to the TypingEnv te.
+     *
      * @param ctx - an operator context.
      */
     @Override
     public void enterOperator(OperatorsParser.OperatorContext ctx) {
-        if(te == null) {
+        if (te == null) {
             return;
         }
         super.enterOperator(ctx);
@@ -54,12 +54,13 @@ public class OperatorTypingEnvBuilder extends OperatorsBaseListener {
     }
 
     /**
-     * Creates a new entry in the FOTierList #latest.
+     * Creates a new entry in the FOTierList latest.
+     *
      * @param ctx - a unit context.
      */
     @Override
     public void enterUnit(OperatorsParser.UnitContext ctx) {
-        if(te == null) {
+        if (te == null) {
             return;
         }
         super.enterUnit(ctx);
@@ -70,10 +71,10 @@ public class OperatorTypingEnvBuilder extends OperatorsBaseListener {
             in[i] = Tier.fromString(list.get(i).getText());
         }
         try {
-            latest.add(out, Tier.T0,in);
+            latest.add(out, Tier.T0, in);
         } catch (IOException e) {
             e.printStackTrace();
             te = null;
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/env/TypingEnv.java b/src/main/java/complexityparser/types/env/TypingEnv.java
index b8446f4634c13f87c75aabb0c7344e2d0ad71399..abfc299f963b04644ba2d78477f57a263430d046 100644
--- a/src/main/java/complexityparser/types/env/TypingEnv.java
+++ b/src/main/java/complexityparser/types/env/TypingEnv.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types.env;
 
 import complexityparser.types.Tier;
@@ -33,12 +32,15 @@ import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
+
 /**
-* A singleton class encoding typing environments.
-* A hashmap relating an operation (operator, method, ...) namespace to the corresponding operator.
-* (An operator has an attribute #results of type ArrayList<FOTier> containing an arraylist of admissible FOTier).
-*/
+ * A singleton class encoding typing environments. A hashmap relating an
+ * operation (operator, method, ...) namespace to the corresponding operator.
+ * (An operator has an attribute results of type ArrayList<FOTier> containing
+ * an arraylist of admissible FOTier).
+ */
 public class TypingEnv {
+
     private static TypingEnv instance = null;
     private HashMap<String, FOTierList> env;
 
@@ -47,35 +49,38 @@ public class TypingEnv {
     }
 
     /**
-     * Initializes the singleton using the file 'operators.config' in the working directory.
+     * Initializes the singleton using the file 'operators.config' in the
+     * working directory.
+     *
      * @throws IOException
      */
     public static void loadInstanceFromFile() throws IOException {
         instance = loadFromFile("operators.config");
-        if(instance == null) {
+        if (instance == null) {
             throw new IOException("operators.config load failed");
         }
     }
 
     /**
-     * Removes any entry of the hashmap env, starting from <root>. 
-     * The entries are supposed to be method entries generated by the visitor parser.
+     * Removes any entry of the hashmap env, starting from <root>. The entries
+     * are supposed to be method entries generated by the visitor parser.
      */
     public void clear() {
         ArrayList<String> keys = new ArrayList<>();
-        for(Map.Entry<String, FOTierList> entry : env.entrySet()) {
-            if(entry.getKey().contains("<root>")) {
+        for (Map.Entry<String, FOTierList> entry : env.entrySet()) {
+            if (entry.getKey().contains("<root>")) {
                 keys.add(entry.getKey());
             }
         }
-        for(String k : keys) {
+        for (String k : keys) {
             env.remove(k);
         }
     }
 
     /**
      *
-     * @return the attribute instance (null if the method #loadInstanceFromFIle() has not been called yet).
+     * @return the attribute instance (null if the method
+     * #loadInstanceFromFIle() has not been called yet).
      */
     public static TypingEnv getInstance() {
         return instance;
@@ -83,6 +88,7 @@ public class TypingEnv {
 
     /**
      * Adds a FOTierList and a name to the typing environment.
+     *
      * @param k - a name.
      * @param o - an operator.
      */
@@ -91,14 +97,14 @@ public class TypingEnv {
     }
 
     /**
-     * 
+     *
      * @param name - a namespace.
      * @param in - input tiers.
-     * @return a FOTier matching a namespace and input tiers given as parameters. 
-     * A default FOTier if no match is found.
+     * @return a FOTier matching a namespace and input tiers given as
+     * parameters. A default FOTier if no match is found.
      */
     public FOTier findRes(String name, Tier... in) {
-        if(env.containsKey(name)) {
+        if (env.containsKey(name)) {
             return env.get(name).findRes(in);
         }
         return new FOTier(Tier.None, Tier.None, new Tier[0]);
@@ -109,19 +115,20 @@ public class TypingEnv {
      * @param name - a name.
      * @param m - a mask.
      * @param in - input tiers.
-     * @return a FOTier matching a namespace, a mask, and input tiers. 
-     * A default FOTier if no match is found.
+     * @return a FOTier matching a namespace, a mask, and input tiers. A default
+     * FOTier if no match is found.
      */
     public FOTier findCompatibleIn(String name, Mask m, Tier... in) {
-        if(env.containsKey(name)) {
+        if (env.containsKey(name)) {
             return env.get(name).findCompatibleRes(m, in);
         }
-        return new FOTier(Tier.None, Tier.None,new Tier[0]);
+        return new FOTier(Tier.None, Tier.None, new Tier[0]);
     }
 
     /**
      * The behaviour is different from #findRes(String name, Tier... in):
      * Additional checks are performed on overriden methods.
+     *
      * @param name - a namespace.
      * @param in - input tiers.
      * @return the FOTier matching a method namespace and input tiers.
@@ -133,7 +140,7 @@ public class TypingEnv {
             name = tos.getParentNamespace(name);
         }
         //If the namespace is of the form "<root>::Object::..." then the method has not been found in the class hierarchy.
-         if(!name.contains("<root>::Object::") && env.containsKey(name)) {
+        if (!name.contains("<root>::Object::") && env.containsKey(name)) {
             res = env.get(name).findRes(in);
             res = checkOverrideMethod(name, res, in);
         }
@@ -141,23 +148,25 @@ public class TypingEnv {
     }
 
     /**
-     * The behaviour is different from #findCompatibleIn(String name, Mask m, Tier... in):
-     * Additional checks are performed on overriden methods.
+     * The behaviour is different from {@link TypingEnv#findCompatibleIn(String name, Mask m,
+     * Tier... in)}: Additional checks are performed on overriden methods.
+     *
      * @param name - a name.
      * @param m - a mask.
      * @param in - input tiers.
-     * @return a compatible FOTier matching a method namespace, mask, and input tiers.
+     * @return a compatible FOTier matching a method namespace, mask, and input
+     * tiers.
      */
     public FOTier findCompatibleMethod(String name, Mask m, Tier... in) {
         TOS tos = TOS.getInstance();
         while (!name.contains("<root>::Object::") && !env.containsKey(name)) {
             name = tos.getParentNamespace(name);
         }
-        if(!name.contains("<root>::Object") && env.containsKey(name)) {
+        if (!name.contains("<root>::Object") && env.containsKey(name)) {
             FOTier[] res = env.get(name).findAllCompatibles(m, in);
-            for(FOTier i : res) {
+            for (FOTier i : res) {
                 FOTier tmp = checkOverrideMethod(name, i, i.getIn());
-                if( ! tmp.equals(new FOTier(Tier.None, Tier.None,new Tier[0]))) {
+                if (!tmp.equals(new FOTier(Tier.None, Tier.None, new Tier[0]))) {
                     return tmp;
                 }
             }
@@ -166,13 +175,15 @@ public class TypingEnv {
     }
 
     /**
-     * Methods returning a primitive type do not need to return exactly the same tier. 
-     * Methods returning reference type need to preserve exactly the tier. 
+     * Methods returning a primitive type do not need to return exactly the same
+     * tier. Methods returning reference type need to preserve exactly the tier.
      * The check will be performed on every subclass to handle method overrides.
+     *
      * @param name - a namespace.
      * @param out - a FOTier.
      * @param in - input tiers.
-     * @return a FOTier matching the input parameters. A default FOTier if there is no match.
+     * @return a FOTier matching the input parameters. A default FOTier if there
+     * is no match.
      */
     public FOTier checkOverrideMethod(String name, FOTier out, Tier... in) {
         TOS tos = TOS.getInstance();
@@ -181,16 +192,18 @@ public class TypingEnv {
     }
 
     /**
-     * A recursive algorithm to check the if the method of namespace, input tiers, and FOTier are compatible with
-     * the class hierarchy.
+     * A recursive algorithm to check the if the method of namespace, input
+     * tiers, and FOTier are compatible with the class hierarchy.
+     *
      * @param name - a namespace.
      * @param out - a FOTier.
-     * @param in -  input tiers.
-     * @return a FOTier matching the inputs. A default FOTier if there is no match.
+     * @param in - input tiers.
+     * @return a FOTier matching the inputs. A default FOTier if there is no
+     * match.
      */
     private FOTier checkOverrideMethod_aux(String name, FOTier out, Tier... in) {
-        FOTier res = new FOTier(out.getOut(),out.getEnv(),in);
-        if(env.containsKey(name)) {
+        FOTier res = new FOTier(out.getOut(), out.getEnv(), in);
+        if (env.containsKey(name)) {
             FOTier tmp = env.get(name).findRes(in);
             /*
             The method return type has to be typed by considering possible method overrides:
@@ -199,26 +212,24 @@ public class TypingEnv {
             The environment tier is the maximum of the input tiers.
              */
             res.setEnv(Tier.max(tmp.getEnv(), out.getEnv()));
-            if(env.get(name).isPrimitiveReturnType()) {
+            if (env.get(name).isPrimitiveReturnType()) {
                 res.setOut(Tier.min(tmp.getOut(), out.getOut()));
-            }
-            else {
-                if(res.getOut() != out.getOut()) {
+            } else {
+                if (res.getOut() != out.getOut()) {
                     return new FOTier(Tier.None, Tier.None, new Tier[0]);
                 }
             }
         }
         TOS tos = TOS.getInstance();
         String[] children = tos.getChildrenNamespaces(name);
-        if(children != null) {
+        if (children != null) {
             for (int i = 0; i < children.length; i++) {
                 FOTier tmp = checkOverrideMethod_aux(children[i], res, in);
                 res.setEnv(Tier.max(tmp.getEnv(), out.getEnv()));
-                if(env.get(name).isPrimitiveReturnType()) {
+                if (env.get(name).isPrimitiveReturnType()) {
                     res.setOut(Tier.min(tmp.getOut(), out.getOut()));
-                }
-                else {
-                    if(res.getOut() != out.getOut()) {
+                } else {
+                    if (res.getOut() != out.getOut()) {
                         return new FOTier(Tier.None, Tier.None, new Tier[0]);
                     }
                 }
@@ -228,7 +239,9 @@ public class TypingEnv {
     }
 
     /**
-     * Loads the operators FOTiers from a file using the ANTLR grammar and the OperatorTypingEnvBuilder class.
+     * Loads the operators FOTiers from a file using the ANTLR grammar and the
+     * OperatorTypingEnvBuilder class.
+     *
      * @param fileName - a file name.
      * @return the singleton instance of TypingEnv.
      */
@@ -266,7 +279,7 @@ public class TypingEnv {
     @Override
     public String toString() {
         StringBuilder str = new StringBuilder();
-        for(Map.Entry<String, FOTierList> e : env.entrySet()) {
+        for (Map.Entry<String, FOTierList> e : env.entrySet()) {
             str.append("\"");
             str.append(e.getKey());
             str.append("\" {\n");
@@ -275,4 +288,4 @@ public class TypingEnv {
         }
         return str.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/tieredtypes/ClassTieredType.java b/src/main/java/complexityparser/types/tieredtypes/ClassTieredType.java
index 73172c43ebbd7dfd476e5c5a49897989d6ef423a..d480875c38f268284ae157afe4c229ea66695488 100644
--- a/src/main/java/complexityparser/types/tieredtypes/ClassTieredType.java
+++ b/src/main/java/complexityparser/types/tieredtypes/ClassTieredType.java
@@ -12,14 +12,15 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types.tieredtypes;
 
 import complexityparser.types.Tier;
 
 public class ClassTieredType extends TieredType {
+
     private String mother;
+
     public ClassTieredType(Tier tier, String mother, String type) {
         super(tier, type);
         this.mother = mother;
@@ -31,10 +32,10 @@ public class ClassTieredType extends TieredType {
 
     @Override
     public String toString() {
-        return "ClassTieredType { " +
-                "tier = " + getTier() +
-                ", noBlock = " + getNoBlock() +
-                ", mother = '" + getMother() +
-                "' }";
+        return "ClassTieredType { "
+                + "tier = " + getTier()
+                + ", noBlock = " + getNoBlock()
+                + ", mother = '" + getMother()
+                + "' }";
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/tieredtypes/MethodTieredType.java b/src/main/java/complexityparser/types/tieredtypes/MethodTieredType.java
index a849a6c4f0d1d13a6f8f1af9626ed264c99beff8..93874465a1235a4816ece00084c3f34c8d3df80f 100644
--- a/src/main/java/complexityparser/types/tieredtypes/MethodTieredType.java
+++ b/src/main/java/complexityparser/types/tieredtypes/MethodTieredType.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types.tieredtypes;
 
 import complexityparser.types.Tier;
@@ -46,11 +45,11 @@ public class MethodTieredType extends TieredType {
 
     @Override
     public String toString() {
-        return "MethodTieredType { " +
-                "methodBlock = " + methodBlock +
-                ", tier = " + tier +
-                ", noBlock = " + noBlock +
-                ", type = '" + type + '\'' +
-                " }";
+        return "MethodTieredType { "
+                + "methodBlock = " + methodBlock
+                + ", tier = " + tier
+                + ", noBlock = " + noBlock
+                + ", type = '" + type + '\''
+                + " }";
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/tieredtypes/TieredType.java b/src/main/java/complexityparser/types/tieredtypes/TieredType.java
index b9fe3848986897cbdf776711a53f62f4e764ddf4..242f542226f5d64df5e9a981523bb5d2ab56790a 100644
--- a/src/main/java/complexityparser/types/tieredtypes/TieredType.java
+++ b/src/main/java/complexityparser/types/tieredtypes/TieredType.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types.tieredtypes;
 
 import complexityparser.tos.TOS;
@@ -56,11 +55,11 @@ public abstract class TieredType {
 
     @Override
     public String toString() {
-        return "TieredType{" +
-                " tier = " + tier +
-                ", noBlock = " + noBlock +
-                ", type = '" + type + '\'' +
-                " }";
+        return "TieredType{"
+                + " tier = " + tier
+                + ", noBlock = " + noBlock
+                + ", type = '" + type + '\''
+                + " }";
     }
 
     public String getMother() {
@@ -70,4 +69,4 @@ public abstract class TieredType {
     public String getType() {
         return type;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/types/tieredtypes/VariableTieredType.java b/src/main/java/complexityparser/types/tieredtypes/VariableTieredType.java
index 86dc65ea0948bde25dc13276aff45836c8d09ff7..e515beb14da937819ea2d4f01326dea4ff2394b9 100644
--- a/src/main/java/complexityparser/types/tieredtypes/VariableTieredType.java
+++ b/src/main/java/complexityparser/types/tieredtypes/VariableTieredType.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.types.tieredtypes;
 
 import complexityparser.types.Tier;
@@ -22,7 +21,8 @@ import complexityparser.types.Tier;
  * A specific class for representing variable tiered type.
  */
 public class VariableTieredType extends TieredType {
+
     public VariableTieredType(Tier tier, String type) {
         super(tier, type);
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/FinalPass.java b/src/main/java/complexityparser/typingVisitors/FinalPass.java
index 603feb4552a05c865cf3ebec622ac539bbf2459a..7e269e1aaed7a888501fcf343a676520a84c4b07 100644
--- a/src/main/java/complexityparser/typingVisitors/FinalPass.java
+++ b/src/main/java/complexityparser/typingVisitors/FinalPass.java
@@ -12,11 +12,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors;
 
-
 import complexityparser.analyse.antlr.JavaParser;
 import complexityparser.listeners.TOSBuilder;
 import complexityparser.listeners.TypingListener;
@@ -27,8 +25,9 @@ import complexityparser.typingVisitors.base.ObjectVisitor;
 import org.antlr.v4.runtime.CommonTokenStream;
 
 /**
- * Performs a final pass on the tree, checks the constructors and generates a string output for the method declarations 
- * (the first and second passes do not generate any string output).
+ * Performs a final pass on the tree, checks the constructors and generates a
+ * string output for the method declarations (the first and second passes do not
+ * generate any string output).
  */
 public class FinalPass extends ObjectVisitor {
 
@@ -38,8 +37,8 @@ public class FinalPass extends ObjectVisitor {
     }
 
     /**
-     * The visit() method should not be called on the final pass.
-     * The ANTLR visit(ParseTree) method should be called instead.
+     * The visit() method should not be called on the final pass. The ANTLR
+     * visit(ParseTree) method should be called instead.
      */
     @Override
     public void visit() {
@@ -48,6 +47,7 @@ public class FinalPass extends ObjectVisitor {
 
     /**
      * Handles the type analysis of constructors.
+     *
      * @param ctx - a constructor declaration context.
      * @return the tier of the constructor body.
      */
@@ -57,7 +57,7 @@ public class FinalPass extends ObjectVisitor {
         setActualEnvironment(Tier.T0);
         visitChildren(ctx);
         Tier res = getTierType(ctx.block());
-        if(res != Tier.T0) {
+        if (res != Tier.T0) {
             res = Tier.None;
         }
         putTierType(ctx, res, Tier.T0);
@@ -66,10 +66,11 @@ public class FinalPass extends ObjectVisitor {
     }
 
     /**
-     * Handles the final pass on method declarations. 
-     * It consists in adding the methods tier type to the hashmap,
-     * modifying the final result (if the method does not type), and generating the string output
-     * (this feature is handled by the putTierType(ParseTree, Tier, EnvironmentTier) method).
+     * Handles the final pass on method declarations. It consists in adding the
+     * methods tier type to the hashmap, modifying the final result (if the
+     * method does not type), and generating the string output (this feature is
+     * handled by the putTierType(ParseTree, Tier, EnvironmentTier) method).
+     *
      * @param ctx - a method declaration context.
      * @return the tier of the body.
      */
@@ -79,17 +80,16 @@ public class FinalPass extends ObjectVisitor {
         Tier resEnv = Tier.None;
         Tier res = Tier.None;
         int nbParam = 0;
-        if(ctx.formalParameters().formalParameterList() != null) {
+        if (ctx.formalParameters().formalParameterList() != null) {
             nbParam = ctx.formalParameters().formalParameterList().formalParameter().size();
         }
         FOTierList op = te.get(namespace);
-        if(op.size() == 0) {
+        if (op.size() == 0) {
             putTierType(ctx, Tier.None, Tier.None);
-        }
-        else {
+        } else {
             FOTier o = op.get(0);
             putTierType(ctx, o.getOut(), o.getEnv());
         }
         return null;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/FirstPass.java b/src/main/java/complexityparser/typingVisitors/FirstPass.java
index 1e6673f414fde77af4157af4c725868f05dba175..4acdead58af75e2faeccffd9ce3d1c142fc1f4ab 100644
--- a/src/main/java/complexityparser/typingVisitors/FirstPass.java
+++ b/src/main/java/complexityparser/typingVisitors/FirstPass.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -30,11 +29,12 @@ import java.io.IOException;
 import java.util.HashSet;
 
 /**
- * The first pass of type inference. During this pass, all valid FOtiers are built and entered in the typing environment 
- * (using the method #visitMethodDeclaration).
- * The incorrect FOtiers will be removed during the second pass.
- * The constructors FOtiers are only checked at the final pass (there is no need to check them earlier especially if they
- * contain method calls that are valid now but may not be valid after the second pass).
+ * The first pass of type inference. During this pass, all valid FOtiers are
+ * built and entered in the typing environment (using the method
+ * #visitMethodDeclaration). The incorrect FOtiers will be removed during the
+ * second pass. The constructors FOtiers are only checked at the final pass
+ * (there is no need to check them earlier especially if they contain method
+ * calls that are valid now but may not be valid after the second pass).
  */
 public class FirstPass extends ObjectVisitor {
 
@@ -52,11 +52,11 @@ public class FirstPass extends ObjectVisitor {
         Tier resEnv = Tier.None;
         Tier res = Tier.None;
         int nbParam = 0;
-        if(ctx.formalParameters().formalParameterList() != null) {
+        if (ctx.formalParameters().formalParameterList() != null) {
             nbParam = ctx.formalParameters().formalParameterList().formalParameter().size();
         }
         boolean isPrimitiveReturnType = true;
-        if(ctx.methodBody().block().expression() != null) {
+        if (ctx.methodBody().block().expression() != null) {
             String type = getType(ctx.methodBody().block().expression());
             isPrimitiveReturnType = type.equals("int") || type.equals("boolean");
         }
@@ -70,25 +70,25 @@ public class FirstPass extends ObjectVisitor {
         Recursive methods can be assigned to incorrect FOtiers in the first pass.
 	This is the reason why a second pass has to be realized (that will loop until a fixpoint has been reached).
          */
-        for(int i = 0; i < (1 << paramTiers.size()); i++) {
+        for (int i = 0; i < (1 << paramTiers.size()); i++) {
             setRecursiveCallsCount(0);
             setRecursiveCallsReceivers(new HashSet<>());
             setWhileCount(0);
             setActualEnvironment(paramTiers.get(0));
-            if(nbParam != 0) {
+            if (nbParam != 0) {
                 setParamTiers(ctx.formalParameters(), paramTiers, noBloc);
             }
             visitMethodBody(ctx.methodBody());
             Tier tmp = null;
             Tier env = null;
-            if(ctx.methodBody().block().expression() != null) {
+            if (ctx.methodBody().block().expression() != null) {
                 tmp = getTierType(ctx.methodBody().block().expression());
             }
-            if(isRecursive()) {
-		//safety conditions:
-                if(getRecursiveCallsCount() == 1 && getWhileCount() == 0) {
+            if (isRecursive()) {
+                //safety conditions:
+                if (getRecursiveCallsCount() == 1 && getWhileCount() == 0) {
                     env = Tier.T1;
-                    if(tmp == null) {
+                    if (tmp == null) {
                         tmp = Tier.T0;
                     }
                     try {
@@ -96,20 +96,18 @@ public class FirstPass extends ObjectVisitor {
                     } catch (IOException e) {
                         e.printStackTrace();
                     }
-                }
-                else {
+                } else {
                     env = Tier.None;
                 }
-            }
-            else {
+            } else {
                 env = getTierType(ctx.methodBody().block());
-                if(ctx.THROWS() != null) {
+                if (ctx.THROWS() != null) {
                     env = Tier.max(Tier.T1, env);
                 }
-                if(tmp == null) {
+                if (tmp == null) {
                     tmp = env;
                 }
-                if(tmp != Tier.None && env != Tier.None) {
+                if (tmp != Tier.None && env != Tier.None) {
                     resEnv = env;
                     res = tmp;
                     try {
@@ -117,8 +115,7 @@ public class FirstPass extends ObjectVisitor {
                     } catch (IOException e) {
                         e.printStackTrace();
                     }
-                }
-                else {
+                } else {
                     env = Tier.None;
                     tmp = Tier.None;
                 }
@@ -129,4 +126,4 @@ public class FirstPass extends ObjectVisitor {
         setOverrideResult(true);
         return res;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/SecondPass.java b/src/main/java/complexityparser/typingVisitors/SecondPass.java
index f1a0c17949df3b9057c9e3a16360eb86151e6d04..8208c46ec1bf236412322dcef6a0310b046b1be6 100644
--- a/src/main/java/complexityparser/typingVisitors/SecondPass.java
+++ b/src/main/java/complexityparser/typingVisitors/SecondPass.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors;
 
 import complexityparser.types.Tier;
@@ -39,10 +38,12 @@ public class SecondPass extends ObjectVisitor {
     }
 
     /**
-     * As long as the isOperatorModified returns true, it means that methods FOTiers have been modified.
-     * Consequenlty, all the methods that (functionnaly) depend on the previous one may not be valid anymore and thus
-     * they must be analysed again. The second pass is iterated until a fixpoint has been reached.
-     * The worst case will be (NONE, NONE) if no other possibility can be found.
+     * As long as the isOperatorModified returns true, it means that methods
+     * FOTiers have been modified. Consequenlty, all the methods that
+     * (functionnaly) depend on the previous one may not be valid anymore and
+     * thus they must be analysed again. The second pass is iterated until a
+     * fixpoint has been reached. The worst case will be None if no
+     * other possibility can be found.
      */
     public void visit() {
         setOperatorModified(true);
@@ -53,9 +54,11 @@ public class SecondPass extends ObjectVisitor {
     }
 
     /**
-     * Handles method declarations by taking the FOTiers contained in the typing environment hashmap and verifying that
-     * those FOTiers are correct and compatible. Removes every FOTier that is not compatible.
-     * If none are compatible, the FOTier is set to (NONE, NONE).
+     * Handles method declarations by taking the FOTiers contained in the typing
+     * environment hashmap and verifying that those FOTiers are correct and
+     * compatible. Removes every FOTier that is not compatible. If none are
+     * compatible, the FOTier output tier (and also environment tier) is set to None.
+     *
      * @param ctx - a method declaration context.
      * @return the tier of the method body.
      */
@@ -65,7 +68,7 @@ public class SecondPass extends ObjectVisitor {
         Tier resEnv = Tier.None;
         Tier res = Tier.None;
         int nbParam = 0;
-        if(ctx.formalParameters().formalParameterList() != null) {
+        if (ctx.formalParameters().formalParameterList() != null) {
             nbParam = ctx.formalParameters().formalParameterList().formalParameter().size();
         }
         FOTierList op = te.get(namespace);
@@ -80,7 +83,7 @@ public class SecondPass extends ObjectVisitor {
             //Set the parameters types in the TOS.
             FOTier input = op.get(i);
             setActualEnvironment(input.getIn()[0]);
-            if(nbParam != 0) {
+            if (nbParam != 0) {
                 setParamTiers(ctx.formalParameters(), input.getIn(), noBloc);
             }
             //Visits the method body and checks that the given input is valid:
@@ -88,28 +91,27 @@ public class SecondPass extends ObjectVisitor {
             visitMethodBody(ctx.methodBody());
             Tier tmp = null;
             Tier env = null;
-            if(ctx.methodBody().block().expression() != null) {
+            if (ctx.methodBody().block().expression() != null) {
                 tmp = getTierType(ctx.methodBody().block().expression());
             }
             env = getTierType(ctx.methodBody().block());
-            if(tmp == null) {
+            if (tmp == null) {
                 tmp = env;
             }
-            if(tmp != Tier.None && env != Tier.None) {
+            if (tmp != Tier.None && env != Tier.None) {
                 i++;
                 res = tmp;
                 resEnv = env;
-            }
-            else {
+            } else {
                 op.remove(i);
                 setOperatorModified(true);
             }
         }
-        if(op.size() == 0) {
+        if (op.size() == 0) {
             resEnv = Tier.None;
             res = Tier.None;
         }
         setOverrideResult(true);
         return res;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/base/BaseBlockStatementVisitor.java b/src/main/java/complexityparser/typingVisitors/base/BaseBlockStatementVisitor.java
index 60c6d0db403897725184de738e24bc988d863cde..12c37ac932019bdfcdc2ec35272864714b47c98c 100644
--- a/src/main/java/complexityparser/typingVisitors/base/BaseBlockStatementVisitor.java
+++ b/src/main/java/complexityparser/typingVisitors/base/BaseBlockStatementVisitor.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors.base;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -25,7 +24,8 @@ import complexityparser.types.Tier;
 import org.antlr.v4.runtime.CommonTokenStream;
 
 /**
- * Abstract class for the base visitor extending BaseStatementVisitor to handle BlockStatements.
+ * Abstract class for the base visitor extending BaseStatementVisitor to handle
+ * BlockStatements.
  */
 public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
 
@@ -34,7 +34,8 @@ public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
     }
 
     /**
-     * Handles variable declarations
+     * Handles variable declarations.
+     *
      * @param ctx - a local variable declaration context.
      * @return the tier of the block.
      */
@@ -42,10 +43,10 @@ public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
     public Object visitLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx) {
         visitChildren(ctx);
         Tier res = Tier.T0;
-        if(isInInitBlock()) {
+        if (isInInitBlock()) {
             res = Tier.T1;
         }
-        if(ctx.TIER() != null) {
+        if (ctx.TIER() != null) {
             String tmp = ctx.TIER().getText();
             tmp = tmp.substring(1, tmp.length() - 1);
             res = Tier.toTier(Integer.valueOf(tmp));
@@ -53,24 +54,23 @@ public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
         Tier min = res;
         Tier expected = res;
         Tier env = Tier.T0;
-        for(JavaParser.VariableDeclaratorContext var : ctx.variableDeclarators().variableDeclarator()) {
+        for (JavaParser.VariableDeclaratorContext var : ctx.variableDeclarators().variableDeclarator()) {
             String name = var.variableDeclaratorId().getText();
             VariableID id = new VariableID(name);
             int block = getBlockNumber(ctx);
             VariableTieredType t = (VariableTieredType) tos.find(id, block);
-            if(t != null) {
+            if (t != null) {
                 //Sets the tier of each variable since a declass block might have modified the original tier value in a previous pass.
                 t.setTier(expected);
             }
-            if(var.variableInitializer() != null) {
+            if (var.variableInitializer() != null) {
                 //A variable declaration may contain multiple variables, thus every variable needs to be checked.
-                if(ctx.typeType().getText().equals("int") || ctx.typeType().getText().equals("boolean")) {
-                    if(Tier.min(res, getTierType(var.variableInitializer().expression())) != res) {
+                if (ctx.typeType().getText().equals("int") || ctx.typeType().getText().equals("boolean")) {
+                    if (Tier.min(res, getTierType(var.variableInitializer().expression())) != res) {
                         res = Tier.None;
                     }
-                }
-                else {
-                    if(res != getTierType(var.variableInitializer().expression())) {
+                } else {
+                    if (res != getTierType(var.variableInitializer().expression())) {
                         res = Tier.None;
                     }
                 }
@@ -83,7 +83,9 @@ public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
     }
 
     /**
-     * Copies the tier of a variable declaration context to its associated block statement parse tree.
+     * Copies the tier of a variable declaration context to its associated block
+     * statement parse tree.
+     *
      * @param ctx - a local variable declaration context.
      * @return the copied tier.
      */
@@ -94,7 +96,9 @@ public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
     }
 
     /**
-     * Copies the tier type of a block statement context to its associated block statement parse tree.
+     * Copies the tier type of a block statement context to its associated block
+     * statement parse tree.
+     *
      * @param ctx - a block statement context.
      * @return the copied tier.
      */
@@ -103,4 +107,4 @@ public abstract class BaseBlockStatementVisitor extends BaseStatementVisitor {
         visitChildren(ctx);
         return copyTierType(ctx.statement(), ctx);
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/base/BaseExpressionVisitor.java b/src/main/java/complexityparser/typingVisitors/base/BaseExpressionVisitor.java
index 9d6df5e66b37b3a4ce6e17d8c2c09e5679786cab..451f8391f412bacbc9ddde27d1250cc6b3ebe4c6 100644
--- a/src/main/java/complexityparser/typingVisitors/base/BaseExpressionVisitor.java
+++ b/src/main/java/complexityparser/typingVisitors/base/BaseExpressionVisitor.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors.base;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -39,7 +38,9 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Copies the tier (and copies also the environment tier) of a primary context to its associated primary expression parse tree.
+     * Copies the tier (and copies also the environment tier) of a primary
+     * context to its associated primary expression parse tree.
+     *
      * @param ctx - a primary context.
      * @return the copied tier.
      */
@@ -50,7 +51,9 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Copies the tier (and copies also the environment tier) of a primary expression context to its associated primary expression parse tree.
+     * Copies the tier (and copies also the environment tier) of a primary
+     * expression context to its associated primary expression parse tree.
+     *
      * @param ctx - a primary expression context.
      * @return the copied tier.
      */
@@ -61,9 +64,11 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Associates a tier and an environment tier (0 by default) to the 'this' expression parse tree.
+     * Associates a tier and an environment tier (0 by default) to the current
+     * expression parse tree.
+     *
      * @param ctx - a primary this context.
-     * @return the default tier 0.
+     * @return the default tier T0.
      */
     @Override
     public Object visitPrimary_this(JavaParser.Primary_thisContext ctx) {
@@ -74,7 +79,9 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Associates a (default) tier and an environment tier (0 by default) to a literal.
+     * Associates a (default) tier and an environment tier (T0 by default) to a
+     * literal.
+     *
      * @param ctx - a primary literal context.
      * @return the default tier.
      */
@@ -86,8 +93,9 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Associates a tier and an environment tier (0 by default) to a variable. 
-     * A seach for the variable identifier is performed in the tos.
+     * Associates a tier and an environment tier (T0 by default) to a variable. A
+     * seach for the variable identifier is performed in the tos.
+     *
      * @param ctx - a primary identifier context.
      * @return the tier of the variable.
      */
@@ -97,15 +105,13 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
         Tier res = Tier.None;
         int block = getBlockNumber(ctx);
         TieredType t = tos.find(new VariableID(ctx.IDENTIFIER().getText()), block);
-        if(t != null) {
-            if(tos.isBlockInClass(block, t.getNoBlock())) {
+        if (t != null) {
+            if (tos.isBlockInClass(block, t.getNoBlock())) {
                 res = getActualEnvironment();
-            }
-            else {
+            } else {
                 res = t.getTier();
             }
-        }
-        else {
+        } else {
             Logger.errPrintln((new VariableID(ctx.IDENTIFIER().getText())) + " -> null");
         }
         putTierType(ctx, res, Tier.T0);
@@ -113,9 +119,10 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Associates a tier to a 'new C()' expression.
+     * Associates a tier to a 'new e' expression.
+     *
      * @param ctx - a new expression context.
-     * @return the tier 0 (None if some error occurs).
+     * @return the tier T0 (None if some error occurs).
      */
     @Override
     public Object visitExpression_new(JavaParser.Expression_newContext ctx) {
@@ -123,17 +130,17 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
         Tier env = Tier.T0;
         Tier res = Tier.T0;
         /*
-        On a constructor call every parameter needs to be either of tier 0 or 0 compatible.
+        On a constructor call every parameter needs to be either of tier T0 or T0 compatible.
         Only primitive types are compatible.
          */
-        if(ctx.creator().classCreatorRest().arguments().expressionList() != null) {
-            for(JavaParser.ExpressionContext c : ctx.creator().classCreatorRest().arguments().expressionList().expression()) {
+        if (ctx.creator().classCreatorRest().arguments().expressionList() != null) {
+            for (JavaParser.ExpressionContext c : ctx.creator().classCreatorRest().arguments().expressionList().expression()) {
                 env = Tier.max(env, getEnvironmentType(c));
                 String type = getType(c);
-                if(c.getText().equals("null")) {
+                if (c.getText().equals("null")) {
                     type = "null";
                 }
-                if(!(type.equals("int") || type.equals("boolean") || type.equals("null")) && getTierType(c) != Tier.T0) {
+                if (!(type.equals("int") || type.equals("boolean") || type.equals("null")) && getTierType(c) != Tier.T0) {
                     res = Tier.None;
                 }
             }
@@ -143,7 +150,9 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
     }
 
     /**
-     * Handles the typing for operations on expressions and sets the environment tier to the max of the operand environment tiers.
+     * Handles the typing for operations on expressions and sets the environment
+     * tier to the max of the operand environment tiers.
+     *
      * @param ctx - an operation context.
      * @return the output tier.
      */
@@ -166,6 +175,7 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
 
     /**
      * Handles the typing for assignments.
+     *
      * @param ctx - an expression assignment contex.
      * @return the tier of the assignment.
      */
@@ -180,29 +190,26 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
         Tier left = getTierType(list.get(0));
         Tier right = getTierType(list.get(1));
         String recName = list.get(0).getText();
-        if(recName.contains("this.")) {
+        if (recName.contains("this.")) {
             recName = recName.replace("this.", "");
         }
         VariableID id = new VariableID(recName);
         VariableTieredType t = (VariableTieredType) tos.find(id, no);
-        if(t != null && tos.isBlockInClass(t.getNoBlock(), tos.getClassBlockNumber(t.getNoBlock()))) {
+        if (t != null && tos.isBlockInClass(t.getNoBlock(), tos.getClassBlockNumber(t.getNoBlock()))) {
             left = getActualEnvironment();
             res = getEnvironmentType(list.get(1));
-            if(type.equals("int") || type.equals("boolean")) {
+            if (type.equals("int") || type.equals("boolean")) {
                 right = Tier.T0;
-                if(Tier.min(left, right) != left) {
+                if (Tier.min(left, right) != left) {
                     res = Tier.None;
+                } else {
                 }
-                else {
-                }
-            }
-            else {
-                if(left != Tier.T0 || right != Tier.T0) {
+            } else {
+                if (left != Tier.T0 || right != Tier.T0) {
                     res = Tier.None;
                 }
             }
-        }
-        else {
+        } else {
             res = Tier.max(right, getEnvironmentType(list.get(1)));
             if (type.equals("int") || type.equals("boolean")) {
                 if (left != Tier.min(left, right)) {
@@ -220,6 +227,7 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
 
     /**
      * Handles unary operators and methods.
+     *
      * @param ctx - a unary expression context.
      * @return the output tier.
      */
@@ -231,20 +239,19 @@ public abstract class BaseExpressionVisitor extends BaseVisitor {
         String op = ctx.prefix.getText();
         String type = getType(ctx.expression());
         FOTier out = te.findRes(op, res);
-        if(out == null || out.getOut() == Tier.None) {
-            if(type.equals("int") || type.equals("boolean")) {
+        if (out == null || out.getOut() == Tier.None) {
+            if (type.equals("int") || type.equals("boolean")) {
                 Mask m = new Mask(1);
                 m.set(0, true);
                 out = te.findCompatibleIn(op, m, res);
             }
         }
-        if(out != null) {
+        if (out != null) {
             res = out.getOut();
-        }
-        else {
+        } else {
             res = Tier.None;
         }
         putTierType(ctx, res, env);
         return res;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/base/BaseStatementVisitor.java b/src/main/java/complexityparser/typingVisitors/base/BaseStatementVisitor.java
index 56587e4423de8006ca812c435d8716bd1203dd78..9ef1717477a48d35b93437817cafbc49300453c8 100644
--- a/src/main/java/complexityparser/typingVisitors/base/BaseStatementVisitor.java
+++ b/src/main/java/complexityparser/typingVisitors/base/BaseStatementVisitor.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors.base;
 
 import complexityparser.analyse.antlr.JavaParser;
@@ -37,6 +36,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Handles the typing of blocks.
+     *
      * @param ctx - a block context.
      * @return the block tier.
      */
@@ -45,7 +45,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
         visitChildren(ctx);
         List<JavaParser.BlockStatementContext> list = ctx.blockStatement();
         Tier res = Tier.T0;
-        for(JavaParser.BlockStatementContext c : list) {
+        for (JavaParser.BlockStatementContext c : list) {
             Tier tmp = getTierType(c);
             res = Tier.max(res, tmp);
         }
@@ -54,7 +54,9 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
     }
 
     /**
-     * Copies the tier type of a block statement context to it's associated block parse tree.
+     * Copies the tier type of a block statement context to it's associated
+     * block parse tree.
+     *
      * @param ctx - a block statement context.
      * @return - the copied tier.
      */
@@ -66,31 +68,31 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Handles modifying the Tier type of variables listed in a declass block
-     * @param ctx - a block  statement declassification context.
+     *
+     * @param ctx - a block statement declassification context.
      * @return the default tier 0.
      */
     @Override
     public Object visitStatement_declass(JavaParser.Statement_declassContext ctx) {
-        if(ctx.declassUnit() != null) {
-            for(int i = 0; i < ctx.declassUnit().size(); i++) {
+        if (ctx.declassUnit() != null) {
+            for (int i = 0; i < ctx.declassUnit().size(); i++) {
                 String name = ctx.declassUnit(i).IDENTIFIER().getText();
                 Tier tier = null;
                 int block = getBlockNumber(ctx);
                 VariableID id = new VariableID(name);
                 VariableTieredType t = (VariableTieredType) tos.find(id, block);
-                if(ctx.declassUnit(i).TIER() != null) {
+                if (ctx.declassUnit(i).TIER() != null) {
                     String tmp = ctx.declassUnit(i).TIER().getText();
                     tmp = tmp.substring(1, tmp.length() - 1);
                     tier = Tier.fromString(tmp);
-                }
-                else {
-                    if(t != null) {
+                } else {
+                    if (t != null) {
                         tier = t.getTier();
                         tier = tier.next();
                     }
                 }
 
-                if(t != null && t.getTier() != Tier.None) {
+                if (t != null && t.getTier() != Tier.None) {
                     t.setTier(tier);
                 }
             }
@@ -101,6 +103,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Handles typing for a 'if' statement.
+     *
      * @param ctx - a if statement context.
      * @return the tier of the 'if' statement.
      */
@@ -120,7 +123,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
         HashSet<String> recursiveCallsReceivers = getRecursiveCallsReceivers();
         HashSet<String> recursiveCallsReceiversFinal = new HashSet<>(recursiveCallsReceivers.size());
         setRecursiveCallsReceivers((HashSet<String>) recursiveCallsReceivers.clone());
-        for(int i = 0; i < ctx.statement().size(); i++) {
+        for (int i = 0; i < ctx.statement().size(); i++) {
             visit(ctx.statement(i));
             recursiveCallsLocalMax = Math.max(recursiveCallsLocalMax, getRecursiveCallsCount());
             recursiveCallsReceiversFinal.addAll(getRecursiveCallsReceivers());
@@ -138,19 +141,19 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
         Tier env = getEnvironmentType(ctx.parExpression().expression());
         Tier res = parExpr;
         //Types the if statement.
-        if(parExpr != Tier.max(parExpr, env)) {
+        if (parExpr != Tier.max(parExpr, env)) {
             res = Tier.None;
         }
         List<JavaParser.StatementContext> list = ctx.statement();
         Tier[] c = new Tier[list.size()];
-        for(int i = 0; i < c.length; i++) {
+        for (int i = 0; i < c.length; i++) {
             c[i] = getTierType(list.get(i));
         }
         Tier max = parExpr;
-        for(Tier t : c) {
+        for (Tier t : c) {
             max = Tier.max(max, t);
         }
-        if(parExpr != max) {
+        if (parExpr != max) {
             res = Tier.None;
         }
         putTierType(ctx, res, res);
@@ -159,6 +162,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Handles typing of a 'while' statement.
+     *
      * @param ctx - a while statement context.
      * @return the while statement tier.
      */
@@ -171,17 +175,16 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
         incrementWhileCount();
         //If the while statement contains recursive calls, the wile statement tier and environment tier are both NONE.
         Tier res;
-        if(getRecursiveCallsCount() != 0) {
+        if (getRecursiveCallsCount() != 0) {
             res = Tier.None;
             env = Tier.None;
         }
-        if(parTier == Tier.T1 && Tier.max(env, Tier.T1) == Tier.T1) {
+        if (parTier == Tier.T1 && Tier.max(env, Tier.T1) == Tier.T1) {
             res = Tier.T1;
-            if(getTierType(ctx.statement()) == Tier.None || getTierType(ctx.statement()) == null) {
+            if (getTierType(ctx.statement()) == Tier.None || getTierType(ctx.statement()) == null) {
                 res = Tier.None;
             }
-        }
-        else {
+        } else {
             res = Tier.None;
         }
         putTierType(ctx, res, Tier.T1);
@@ -190,6 +193,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Copies the tier of expressions to their associated statement parse tree.
+     *
      * @param ctx - an expression statement context.
      * @return the max of the expression tier and the environment tier.
      */
@@ -204,6 +208,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Handles break statements (using tier 1).
+     *
      * @param ctx - a beack statement context.
      * @return the tier 1 by default.
      */
@@ -216,8 +221,9 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
     }
 
     /**
-     * Verifies if a catch clause is valid.
-     * Because literals are typed with tier 1, an assignment will type 1 and thus not be a valid catch clause.
+     * Verifies if a catch clause is valid. Because literals are typed with tier
+     * 1, an assignment will type 1 and thus not be a valid catch clause.
+     *
      * @param ctx - a catch clause context.
      * @return the tier None (if the block has tier distinct from 0).
      */
@@ -227,7 +233,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
         visitChildren(ctx);
         resetPrimitiveDefaultTier();
         Tier res = getTierType(ctx.block());
-        if(res != Tier.T0) {
+        if (res != Tier.T0) {
             res = Tier.None;
         }
         putTierType(ctx, res, Tier.T0);
@@ -236,6 +242,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Verifies if a finally clause is valid.
+     *
      * @param ctx - a finally block context.
      * @return the tier of the block.
      */
@@ -249,6 +256,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Handles try {} catch {} statements.
+     *
      * @param ctx - a try statement context.
      * @return the tier of the block.
      */
@@ -256,23 +264,23 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
     public Object visitStatement_try(JavaParser.Statement_tryContext ctx) {
         visitChildren(ctx);
         Tier res = Tier.T1;
-        if(getTierType(ctx.block()) == Tier.None) {
+        if (getTierType(ctx.block()) == Tier.None) {
             res = Tier.None;
         }
-        if(ctx.catchClause().size() != 0 && res != Tier.None) {
+        if (ctx.catchClause().size() != 0 && res != Tier.None) {
             for (JavaParser.CatchClauseContext c : ctx.catchClause()) {
                 if (getTierType(c) != Tier.T0) {
                     res = Tier.None;
                 }
             }
         }
-        if(ctx.finallyBlock() != null && res != Tier.None) {
-            if(getTierType(ctx.finallyBlock()) == Tier.None) {
+        if (ctx.finallyBlock() != null && res != Tier.None) {
+            if (getTierType(ctx.finallyBlock()) == Tier.None) {
                 res = Tier.None;
             }
         }
 
-        if(ctx.finallyBlock() == null && ctx.catchClause().size() == 0) {
+        if (ctx.finallyBlock() == null && ctx.catchClause().size() == 0) {
             res = Tier.None;
         }
         putTierType(ctx, res, Tier.T0);
@@ -281,6 +289,7 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
 
     /**
      * Verifies throw statements.
+     *
      * @param ctx - a throw statement context.
      * @return the tier of the block.
      */
@@ -291,4 +300,4 @@ public abstract class BaseStatementVisitor extends BaseExpressionVisitor {
         putTierType(ctx, res, Tier.T0);
         return res;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/base/BaseVisitor.java b/src/main/java/complexityparser/typingVisitors/base/BaseVisitor.java
index d84a57cf674de709dbaeeb33816f1c0572c00e35..51742a462f25f528ecdd11ac96aff2164230c619 100644
--- a/src/main/java/complexityparser/typingVisitors/base/BaseVisitor.java
+++ b/src/main/java/complexityparser/typingVisitors/base/BaseVisitor.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors.base;
 
 import complexityparser.types.Tier;
@@ -35,6 +34,7 @@ import java.util.HashSet;
  * Base class used by the tier analysis.
  */
 public abstract class BaseVisitor extends JavaParserBaseVisitor {
+
     private ParseTreeProperty<Tier> tierTypes; //The tier for each node of the parse tree.
     private ParseTreeProperty<Tier> environment; //The block (environment) tier for each node of the parse tree. It is used for method calls in expressions.
     private Tier actualEnvironment; //The current block (environment) tier. Used for fields.
@@ -73,7 +73,8 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
 
     /**
      *
-     * @return true if the visitor is located inside an init block, false otherwise.
+     * @return true if the visitor is located inside an init block, false
+     * otherwise.
      */
     public boolean isInInitBlock() {
         return inInitBlock;
@@ -84,7 +85,9 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     }
 
     /**
-     * Sets a flag to indicate if the visitor is currently inside an init block or not.
+     * Sets a flag to indicate if the visitor is currently inside an init block
+     * or not.
+     *
      * @param inInitBlock - a boolean value.
      */
     public void setInInitBlock(boolean inInitBlock) {
@@ -101,6 +104,7 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
 
     /**
      * Sets the default tier used to type literals.
+     *
      * @param literalDefaultTier - a new default tier.
      */
     public void setLiteralDefaultTier(Tier literalDefaultTier) {
@@ -115,7 +119,9 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     }
 
     /**
-     * Adds a namespace to the list (the list of mutually recursive methods contain strictly more than 1 method namespace).
+     * Adds a namespace to the list (the list of mutually recursive methods
+     * contain strictly more than 1 method namespace).
+     *
      * @param name - a method namespace.
      */
     public void addRecursiveNamespace(String name) {
@@ -123,7 +129,8 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     }
 
     /**
-     * Clears the array containing the namespaces for the mutually recursive methods.
+     * Clears the array containing the namespaces for the mutually recursive
+     * methods.
      */
     public void clearRecursiveNamespaces() {
         recursiveNamespaces.clear();
@@ -132,7 +139,8 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     /**
      *
      * @param name - a method namespace.
-     * @return true if the given namespace is contained in the current list of mutually recursive methods, false otherwise.
+     * @return true if the given namespace is contained in the current list of
+     * mutually recursive methods, false otherwise.
      */
     public boolean containsRecursiveNamespace(String name) {
         return recursiveNamespaces.contains(name);
@@ -142,27 +150,29 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
      * Increments the count of recursive calls.
      */
     public void incrementRecursiveCallsCount(String name) {
-        if(recursiveCallsReceivers.size() == 0) {
+        if (recursiveCallsReceivers.size() == 0) {
             recursiveCallsCount++;
         }
-        if(recursiveCallsReceivers.contains(name)) {
+        if (recursiveCallsReceivers.contains(name)) {
             recursiveCallsCount++;
-        }
-        else {
+        } else {
             recursiveCallsReceivers.add(name);
         }
     }
 
     /**
      *
-     * @return a hashset containing all the receivers used until now for recursive calls.
+     * @return a hashset containing all the receivers used until now for
+     * recursive calls.
      */
     public HashSet<String> getRecursiveCallsReceivers() {
         return recursiveCallsReceivers;
     }
 
     /**
-     * Sets the hashset containing all the receivers used until now for recursive calls to the parameter.
+     * Sets the hashset containing all the receivers used until now for
+     * recursive calls to the parameter.
+     *
      * @param recursiveCallsReceivers - a hashset of namespaces.
      */
     public void setRecursiveCallsReceivers(HashSet<String> recursiveCallsReceivers) {
@@ -186,6 +196,7 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
 
     /**
      * Sets the while count to the given value.
+     *
      * @param whileCount - a number of while encountered.
      */
     public void setWhileCount(int whileCount) {
@@ -202,6 +213,7 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
 
     /**
      * Sets the number of recursive calls to the given value.
+     *
      * @param val - a number of recursive calls encountered.
      */
     public void setRecursiveCallsCount(int val) {
@@ -218,12 +230,9 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     }
 
     /**
-     * Sets the value of override result:
-     * if true,
-     *     the result value will be overriden on call of putTierType(..)
-     *     and a string output will be generated
-     * else
-     *     nothing of the above will be done.
+     * Sets the value of override result: if true, the result value will be
+     * overriden on call of putTierType(..) and a string output will be
+     * generated else nothing of the above will be done.
      *
      * @param overrideResult
      */
@@ -241,6 +250,7 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
 
     /**
      * Updates the final result to the given value.
+     *
      * @param result - a tier.
      */
     protected void setResult(Tier result) {
@@ -248,14 +258,15 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     }
 
     /**
-     * Associates a tier and a block tier to a parse tree.
-     * If the visitor is located inside an init block nothing is done.
+     * Associates a tier and a block tier to a parse tree. If the visitor is
+     * located inside an init block nothing is done.
+     *
      * @param ctx - a parse tree.
      * @param t - a tier.
      * @param env - a block (environment) tier.
      */
     protected void putTierType(ParseTree ctx, Tier t, Tier env) {
-        if(! isInInitBlock()) {
+        if (!isInInitBlock()) {
             tierTypes.put(ctx, t);
             environment.put(ctx, env);
             if (overrideResult) {
@@ -274,9 +285,11 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     }
 
     /**
-     * Updates the values tier and type associated to the parse tree dst to the values of tier and type of src in the tierTypes attribute.
+     * Updates the values tier and type associated to the parse tree dst to the
+     * values of tier and type of src in the tierTypes attribute.
+     *
      * @param src - a parse tree.
-     * @param dst  - a parse tree.
+     * @param dst - a parse tree.
      * @return the value of the updated tier.
      */
     protected Tier copyTierType(ParseTree src, ParseTree dst) {
@@ -304,6 +317,7 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
 
     /**
      * Sets the current environment tier to the given value.
+     *
      * @param actualEnvironment - the new current environment tier.
      */
     public void setActualEnvironment(Tier actualEnvironment) {
@@ -313,7 +327,7 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     /**
      *
      * @param ctx - a parse tree.
-     * @return the tier  associated with the parse tree ctx, may be null.
+     * @return the tier associated with the parse tree ctx, may be null.
      */
     protected Tier getTierType(ParseTree ctx) {
         return tierTypes.get(ctx);
@@ -322,15 +336,17 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
     /**
      *
      * @param ctx - a parse tree.
-     * @return a string representation of the type associated to the parse tree ctx.
+     * @return a string representation of the type associated to the parse tree
+     * ctx.
      */
     protected String getType(ParseTree ctx) {
         return types.get(ctx);
     }
 
     /**
-     * A helper function to avoid duplicate code and to print the appropriate message
-     * to the appropirate output (error or standard).
+     * A helper function to avoid duplicate code and to print the appropriate
+     * message to the appropirate output (error or standard).
+     *
      * @param rule - the name of the grammar rule.
      * @param txt - the code associated with the grammar rule.
      * @param t - the tier type of the rule.
@@ -338,18 +354,18 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
      */
     private void print(String rule, String txt, Tier t, Tier env, int line) {
         String message = rule + " {\n\tline:" + line + " ; " + txt + "\n\t-> " + t + "\n\t env: " + env + "\n}";
-        if(t == Tier.None || env == Tier.None) {
+        if (t == Tier.None || env == Tier.None) {
             Logger.errPrintln("cannot type " + message);
-        }
-        else {
+        } else {
             Logger.println(message);
         }
     }
 
     /**
-     * The type analysis for an #init #init block. The tier 0 is used.
+     * The type analysis for an #init #init block. The tier T0 is used.
+     *
      * @param ctx - an init context.
-     * @return the tier value 0.
+     * @return the tier T0.
      */
     @Override
     public Object visitStatement_init(JavaParser.Statement_initContext ctx) {
@@ -359,4 +375,4 @@ public abstract class BaseVisitor extends JavaParserBaseVisitor {
         putTierType(ctx, Tier.T0, Tier.T0);
         return Tier.T0;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/complexityparser/typingVisitors/base/ObjectVisitor.java b/src/main/java/complexityparser/typingVisitors/base/ObjectVisitor.java
index 8801b846ec1175b0a530cfb0a6983d228574bf76..a17e05ae8354e948c04a10ea2394ab36e84fecf7 100644
--- a/src/main/java/complexityparser/typingVisitors/base/ObjectVisitor.java
+++ b/src/main/java/complexityparser/typingVisitors/base/ObjectVisitor.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package complexityparser.typingVisitors.base;
 
 import complexityparser.types.Tier;
@@ -45,7 +44,7 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
 
     public ObjectVisitor(Graph g, TOSBuilder tosBuilder, TypingListener typingListener, CommonTokenStream stream) {
         this(tosBuilder, typingListener, stream);
-        if(g != null) {
+        if (g != null) {
             components = g.getComponents();
             Collections.reverse(components);
         }
@@ -67,6 +66,7 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
 
     /**
      * Sets the isRecursive attribute to the given value.
+     *
      * @param recursive - a boolean.
      */
     public void setRecursive(boolean recursive) {
@@ -74,8 +74,9 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
     }
 
     /**
-     * 
-     * @return true if an operator or method FOTier of the TypingEnv has been modified/reduced.
+     *
+     * @return true if an operator or method FOTier of the TypingEnv has been
+     * modified/reduced.
      */
     public boolean isOperatorModified() {
         return operatorModified;
@@ -83,6 +84,7 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
 
     /**
      * Sets the #operatorModified attribute to the given value.
+     *
      * @param operatorModified - a boolean.
      */
     public void setOperatorModified(boolean operatorModified) {
@@ -90,8 +92,10 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
     }
 
     /**
-     * Takes the strongly connected components in the call graph and verifies them by calling the visitMethodDeclaration method on them.
-     * If a method is recursive or mutually recursive, then the isRecursive attribute is set accordingly.
+     * Takes the strongly connected components in the call graph and verifies
+     * them by calling the visitMethodDeclaration method on them. If a method is
+     * recursive or mutually recursive, then the isRecursive attribute is set
+     * accordingly.
      */
     public void visit() {
         for (ArrayList<Node> c : components) {
@@ -109,7 +113,9 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
     }
 
     /**
-     * A helper method setting the tiers of method parameters in the tos to the given values.
+     * A helper method setting the tiers of method parameters in the tos to the
+     * given values.
+     *
      * @param ctx - a formal parameters context.
      * @param paramTiers - an array of tiers.
      * @param noBloc - a block index.
@@ -119,20 +125,21 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
     }
 
     /**
-     * A helper method setting the tiers of method parameters in the tos to the given values.
+     * A helper method setting the tiers of method parameters in the tos to the
+     * given values.
+     *
      * @param ctx - a formal tier parameters context.
      * @param paramTiers - an array of tiers.
      * @param noBloc - a block index.
      */
     protected void setParamTiers(JavaParser.FormalParametersContext ctx, Tier[] paramTiers, int noBloc) {
         int i = 1;
-        for(JavaParser.FormalParameterContext c : ctx.formalParameterList().formalParameter()) {
+        for (JavaParser.FormalParameterContext c : ctx.formalParameterList().formalParameter()) {
             VariableID id = new VariableID(c.variableDeclaratorId().IDENTIFIER().getText());
             TieredType t = tos.find(id, noBloc);
-            if(t != null) {
+            if (t != null) {
                 t.setTier(paramTiers[i]);
-            }
-            else {
+            } else {
                 System.err.println("TOSBuilder::setParamTiers error: " + id + " not found in TOS");
             }
             i++;
@@ -140,7 +147,8 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
     }
 
     /**
-     * Handles a field of an object. 
+     * Handles a field of an object.
+     *
      * @param ctx - an expression identifier context.
      * @return the expression tier.
      */
@@ -148,14 +156,13 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
     public Object visitExpression_identifier(JavaParser.Expression_identifierContext ctx) {
         visitChildren(ctx);
         Tier res = Tier.None;
-        if(ctx.expression().getText().equals("this")) {
+        if (ctx.expression().getText().equals("this")) {
             res = getActualEnvironment();
-        }
-        else {
+        } else {
             String type = getType(ctx.expression());
             int no = getBlockNumber(ctx);
             no = tos.getClassBlockNumber(no);
-            if(tos.getClassName(no).equals(type)) {
+            if (tos.getClassName(no).equals(type)) {
                 res = getTierType(ctx.expression());
             }
         }
@@ -165,6 +172,7 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
 
     /**
      * Handles method calls
+     *
      * @param ctx - an expression call context.
      * @return the expression tier.
      */
@@ -186,7 +194,7 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
             int i = 1;
             for (JavaParser.ExpressionContext e : list) {
                 String t = getType(e);
-                if(t.equals("int") || t.equals("boolean") || t.equals("null")) {
+                if (t.equals("int") || t.equals("boolean") || t.equals("null")) {
                     mask.set(i, true);
                 }
                 param.add(t);
@@ -194,21 +202,19 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
                 env = Tier.max(env, getEnvironmentType(e));
                 i++;
             }
-        }
-        else if(name.equals("clone")) {
+        } else if (name.equals("clone")) {
             putTierType(ctx, Tier.T0, Tier.T0);
             return Tier.T0;
         }
         //Checks the received type.
         String receiverName;
-        if(ctx.expression() != null) {
+        if (ctx.expression() != null) {
             type = getType(ctx.expression());
             paramTiers.set(0, getTierType(ctx.expression()));
             env = getEnvironmentType(ctx.expression());
             receiverName = ctx.getText();
             receiverName = receiverName.replace("this.", "");
-        }
-        else {
+        } else {
             int no = getBlockNumber(ctx);
             type = tos.getClassName(no);
             paramTiers.set(0, getActualEnvironment());
@@ -216,47 +222,45 @@ public abstract class ObjectVisitor extends BaseBlockStatementVisitor {
         }
         //Builds the method namespace.
         String namespace = TOS.buildMethodNamespace(param, type, name);
-        //Detects recursive calls: forces the environment tier to be 1 and increments the counter for recursive calls.
-        if(containsRecursiveNamespace(namespace)) {
+        //Detects recursive calls: forces the environment tier to be T1 and increments the counter for recursive calls.
+        if (containsRecursiveNamespace(namespace)) {
             incrementRecursiveCallsCount(receiverName);
             env = Tier.T1;
-        }
-        else {
-            for(String current : getRecursiveNamespaces()) {
+        } else {
+            for (String current : getRecursiveNamespaces()) {
                 String cn = current;
                 while (!cn.contains("<root>::Object::") && !cn.equals(namespace)) {
                     cn = tos.getParentNamespace(cn);
                 }
-                if(cn.equals(namespace)) {
+                if (cn.equals(namespace)) {
                     incrementRecursiveCallsCount(receiverName);
                     env = Tier.T1;
-                }
-                else {
+                } else {
                     cn = namespace;
                     while (!cn.contains("<root>::Object::") && !cn.equals(current)) {
                         cn = tos.getParentNamespace(cn);
                     }
-                    if(cn.equals(current)) {
+                    if (cn.equals(current)) {
                         incrementRecursiveCallsCount(receiverName);
                         env = Tier.T1;
                     }
                 }
             }
         }
-        //Finds the namespace in the typing environment #te and returns 
-	//a compatible FOTier with the input tiers provided in the parameters.
+        //Finds the namespace in the typing environment te and returns 
+        //a compatible FOTier with the input tiers provided in the parameters.
         FOTier output = te.findMethod(namespace, paramTiers.getArray());
-        if(output == null || output.getOut() == Tier.None) {
+        if (output == null || output.getOut() == Tier.None) {
             output = te.findCompatibleMethod(namespace, mask, paramTiers.getArray());
-            if(output == null) {
+            if (output == null) {
                 res = Tier.None;
             }
         }
-        if(output != null) {
+        if (output != null) {
             res = output.getOut();
             env = output.getEnv();
         }
         putTierType(ctx, res, env);
         return res;
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lib/Logger.java b/src/main/java/lib/Logger.java
index a4507eb50620e9720566cc910d7cde8e12c29527..c47fde163ea25cf139ef15080338d850c720f584 100644
--- a/src/main/java/lib/Logger.java
+++ b/src/main/java/lib/Logger.java
@@ -12,22 +12,23 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib;
 
 import java.io.PrintStream;
 
 /**
- * Simple logger class
- * if used to print messages to stdout, stdout can be easily redirected to anything else
+ * Simple logger class if used to print messages to stdout, stdout can be easily
+ * redirected to anything else.
  */
 public class Logger {
+
     private static PrintStream out = System.out;
     private static PrintStream err = System.err;
 
     /**
      * set the standard output stream
+     *
      * @param out
      */
     public static void setOut(PrintStream out) {
@@ -36,6 +37,7 @@ public class Logger {
 
     /**
      * set the standard error stream
+     *
      * @param err
      */
     public static void setErr(PrintStream err) {
@@ -44,6 +46,7 @@ public class Logger {
 
     /**
      * print to the output stream
+     *
      * @param str
      */
     public static void println(String str) {
@@ -52,6 +55,7 @@ public class Logger {
 
     /**
      * print to the error stream
+     *
      * @param str
      */
     public static void errPrintln(String str) {
diff --git a/src/main/java/lib/Mask.java b/src/main/java/lib/Mask.java
index 0ba75c958bf6a3061996ce9831fe1f632dd92c0d..f2de53ddec39b250074bf3daa9bbae3e9326b089 100644
--- a/src/main/java/lib/Mask.java
+++ b/src/main/java/lib/Mask.java
@@ -12,16 +12,16 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib;
 
 import java.util.Arrays;
 
 /**
- * A basic 'bitfield' used as mask for the compatibility check of operators
+ * A basic 'bitfield' used as mask for the compatibility check of operators.
  */
 public class Mask {
+
     private boolean[] array;
 
     public Mask(int size) {
@@ -40,6 +40,7 @@ public class Mask {
 
     /**
      * Sets the value at index i (no checks are done on the index).
+     *
      * @param i - an integer.
      * @param v - a boolean.
      */
@@ -49,7 +50,7 @@ public class Mask {
 
     /**
      *
-     * @return the size of the  mask.
+     * @return the size of the mask.
      */
     public int size() {
         return array.length;
@@ -59,19 +60,18 @@ public class Mask {
     public String toString() {
         StringBuilder str = new StringBuilder();
         str.append("Mask[");
-        for(int i = 0; i < size(); i++) {
-            if(get(i)) {
+        for (int i = 0; i < size(); i++) {
+            if (get(i)) {
                 str.append("1");
-            }
-            else {
+            } else {
                 str.append("0");
             }
 
-            if(i < size() - 1) {
+            if (i < size() - 1) {
                 str.append(", ");
             }
         }
         str.append("]");
         return str.toString();
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lib/Observable.java b/src/main/java/lib/Observable.java
index 8c792b3886f042c2a90673be23786188d63277ab..4b396e7a4d64eac25c62d0a25dc09009574ee503 100644
--- a/src/main/java/lib/Observable.java
+++ b/src/main/java/lib/Observable.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib;
 
 import java.util.ArrayList;
@@ -22,6 +21,7 @@ import java.util.ArrayList;
  * A simple abstract class to make it easier to update the GUI.
  */
 public abstract class Observable {
+
     private ArrayList<Observer> list;
 
     /**
@@ -33,6 +33,7 @@ public abstract class Observable {
 
     /**
      * Adds an observer to the list.
+     *
      * @param o - the observer to add.
      */
     public void addObserver(Observer o) {
@@ -41,6 +42,7 @@ public abstract class Observable {
 
     /**
      * Removes a component from the list.
+     *
      * @param o - the observer to remove.
      */
     public void removeObserver(Observer o) {
@@ -51,8 +53,8 @@ public abstract class Observable {
      * Notifies the observers so that they can be updated.
      */
     public void update() {
-        for(Observer o : list) {
+        for (Observer o : list) {
             o.update(this);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lib/Observer.java b/src/main/java/lib/Observer.java
index a376766593c442cc006fd30fd7bad02ca71dc268..1a173dafd2ac94fb838fff47d3089ffd00c4565b 100644
--- a/src/main/java/lib/Observer.java
+++ b/src/main/java/lib/Observer.java
@@ -12,13 +12,13 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib;
 
 /**
  * A simple interface to make it easier to update the GUI.
  */
 public interface Observer {
+
     void update(Observable m);
 }
diff --git a/src/main/java/lib/graph/Graph.java b/src/main/java/lib/graph/Graph.java
index 006b82901aab4220fedda329bab0f6ca21fe5d1b..9f192f04de1663face34618ba0c3ece9c29d2b0d 100644
--- a/src/main/java/lib/graph/Graph.java
+++ b/src/main/java/lib/graph/Graph.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib.graph;
 
 import org.antlr.v4.runtime.tree.ParseTree;
@@ -25,6 +24,7 @@ import java.util.*;
  * Represents a graph
  */
 public class Graph {
+
     private ArrayList<Node> nodes;
 
     public Graph() {
@@ -33,8 +33,9 @@ public class Graph {
 
     /**
      * Creates a node with a given name and a given parse tree.
-     * @param name - the name
-     * @param ctx - the parse tree
+     *
+     * @param name - the name.
+     * @param ctx - the parse tree.
      * @return the new node index.
      */
     public int createNode(String name, ParseTree ctx) {
@@ -45,6 +46,7 @@ public class Graph {
 
     /**
      * Creates a node from a given node.
+     *
      * @param n - a node.
      * @return the new node number.
      */
@@ -60,8 +62,8 @@ public class Graph {
      * @return the index of the node of the given name, -1 if not found
      */
     public int find(String name) {
-        for(int i = 0; i < nodes.size(); i++) {
-            if(name.equals(nodes.get(i).getName())) {
+        for (int i = 0; i < nodes.size(); i++) {
+            if (name.equals(nodes.get(i).getName())) {
                 return i;
             }
         }
@@ -74,8 +76,8 @@ public class Graph {
      * @return the node of the given name, null if not found
      */
     public Node get(String name) {
-        for(int i = 0; i < nodes.size(); i++) {
-            if(name.equals(nodes.get(i).getName())) {
+        for (int i = 0; i < nodes.size(); i++) {
+            if (name.equals(nodes.get(i).getName())) {
                 return nodes.get(i);
             }
         }
@@ -83,17 +85,19 @@ public class Graph {
     }
 
     /**
-     * Adds an arrow between the nodes of names src and dst. Create the nodes if they are not present.
+     * Adds an arrow between the nodes of names src and dst. Create the nodes if
+     * they are not present.
+     *
      * @param src - the name of a node.
      * @param dst - the name of a node.
      */
     public void addConnection(String src, String dst) {
         int srci = find(src);
         int dsti = find(dst);
-        if(srci == -1) {
+        if (srci == -1) {
             srci = createNode(src, null);
         }
-        if(dsti == -1) {
+        if (dsti == -1) {
             dsti = createNode(dst, null);
         }
         nodes.get(srci).add(dsti);
@@ -114,8 +118,8 @@ public class Graph {
      * @return the node index associated with the given name.
      */
     public int getNo(String name) {
-        for(int i = 0; i < size(); i++) {
-            if(getName(i).equals(name)) {
+        for (int i = 0; i < size(); i++) {
+            if (getName(i).equals(name)) {
                 return i;
             }
         }
@@ -125,7 +129,8 @@ public class Graph {
     /**
      *
      * @param no - a node number.
-     * @return an iterator to walk through all the arrows of the node indexed by no.
+     * @return an iterator to walk through all the arrows of the node indexed by
+     * no.
      */
     public Iterator<Integer> next(int no) {
         return nodes.get(no).iterator();
@@ -133,7 +138,7 @@ public class Graph {
 
     /**
      *
-     * @return the number of arrows (nodes in the attribute #nodes).
+     * @return the number of arrows (nodes in the attribute nodes).
      */
     public int size() {
         return nodes.size();
@@ -146,8 +151,8 @@ public class Graph {
     public String toDot() {
         StringBuilder str = new StringBuilder();
         str.append("digraph gr {\n");
-        for(Node n : nodes) {
-            for(int i : n) {
+        for (Node n : nodes) {
+            for (int i : n) {
                 str.append("\t\"");
                 str.append(n.getName());
                 str.append("\" -> \"");
@@ -161,7 +166,8 @@ public class Graph {
 
     /**
      *
-     * @return a list containing the node names in suffix order (the DFS exit order)
+     * @return a list containing the node names in suffix order (the DFS exit
+     * order).
      */
     private ArrayList<String> dfsSuffix() {
         int s = 0;
@@ -185,8 +191,8 @@ public class Graph {
                     stack.pop();
                 }
             }
-            for(s = 0; s < nodes.size() && visited[s]; s++);
-            if(s < nodes.size()) {
+            for (s = 0; s < nodes.size() && visited[s]; s++);
+            if (s < nodes.size()) {
                 stack.push(new Pair(s, next(s)));
                 visited[s] = true;
             }
@@ -195,8 +201,9 @@ public class Graph {
     }
 
     /**
-     * Executes a DFS on the graph using the order given in parameter
-     * and generates an arraylist containing the strongly connected components.
+     * Executes a DFS on the graph using the order given in parameter and
+     * generates an arraylist containing the strongly connected components.
+     *
      * @param order - the reversed DFS-exit-order names of nodes.
      * @return the strongly connected components of the graph.
      */
@@ -205,14 +212,14 @@ public class Graph {
         stack.ensureCapacity(nodes.size());
         boolean[] visited = new boolean[nodes.size()];
         ArrayList<ArrayList<Node>> components = new ArrayList<>();
-        for(Node n : nodes) {
+        for (Node n : nodes) {
             n.sort(order);
         }
-        for(String str : order) {
+        for (String str : order) {
             int i = getNo(str);
             components.add(new ArrayList<>());
             //If the node has already been visited nothing is done.
-            if(!visited[getNo(str)]) {
+            if (!visited[getNo(str)]) {
                 //Else it is added to the stack and marked as visited.
                 stack.push(new Pair(i, nodes.get(i).iterator()));
                 visited[i] = true;
@@ -222,7 +229,7 @@ public class Graph {
                 Every node that is accessible from the current one
                 that has not already been visited is also added
                 to the strongly connected components.
-                */
+                 */
                 while (!stack.empty()) {
                     Pair tmp = stack.peek();
                     if (tmp.hasNext()) {
@@ -240,8 +247,8 @@ public class Graph {
             }
         }
         //Empty components are removed.
-        for(int i = 0; i < components.size(); i++) {
-            if(components.get(i).size() == 0) {
+        for (int i = 0; i < components.size(); i++) {
+            if (components.get(i).size() == 0) {
                 components.remove(i);
                 i--;
             }
@@ -266,11 +273,11 @@ public class Graph {
      */
     public Graph mirror() {
         Graph g = new Graph();
-        for(Node n : nodes) {
+        for (Node n : nodes) {
             g.createNode(n);
         }
-        for(Node n : nodes) {
-            for(int i : n) {
+        for (Node n : nodes) {
+            for (int i : n) {
                 g.addConnection(nodes.get(i).getName(), n.getName());
             }
         }
@@ -278,7 +285,9 @@ public class Graph {
     }
 
     /**
-     * Creates a file with the given name containing the result of the toDot() function.
+     * Creates a file with the given name containing the result of the toDot()
+     * function.
+     *
      * @param name - the file name.
      */
     public void toFile(String name) {
@@ -299,49 +308,12 @@ public class Graph {
     public String getComponentsString() {
         StringBuilder str = new StringBuilder();
         ArrayList<ArrayList<Node>> components = getComponents();
-        for(ArrayList<Node> c : components) {
-            for(Node n : c) {
+        for (ArrayList<Node> c : components) {
+            for (Node n : c) {
                 str.append(n + ", ");
             }
             str.append("\n--------------\n");
         }
         return str.toString();
     }
-
-
-    public static void main(String[] argc) {
-	//for test purpose
-        Graph g = new Graph();
-        g.createNode("1", null);
-        g.createNode("2", null);
-        g.createNode("3", null);
-        g.createNode("4", null);
-        g.createNode("5", null);
-        g.createNode("6", null);
-        g.createNode("7", null);
-        g.createNode("8", null);
-        g.addConnection("1", "2");
-        g.addConnection("1", "3");
-        g.addConnection("6", "1");
-        g.addConnection("2", "3");
-        g.addConnection("2", "4");
-        g.addConnection("4", "1");
-        g.addConnection("4", "5");
-        g.addConnection("5", "3");
-        g.addConnection("7", "6");
-        g.addConnection("7", "8");
-        g.addConnection("8", "7");
-        g.toFile("res.dot");
-        g.mirror().toFile("mirror.dot");
-        ArrayList<String> suffix = g.dfsSuffix();
-        Collections.reverse(suffix);
-        ArrayList<ArrayList<Node>> components = g.getComponents();
-        for(ArrayList<Node> c : components) {
-            for(Node n : c) {
-                System.out.print(n.getName() + ", ");
-            }
-            System.out.println("\n--------------");
-        }
-        //g.dfsSuffix();
-    }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lib/graph/Node.java b/src/main/java/lib/graph/Node.java
index 84f871d75b00667ef711ad73b49f870822550fc6..eb80d115d17054206de97b88af5d106e3c4fe3af 100644
--- a/src/main/java/lib/graph/Node.java
+++ b/src/main/java/lib/graph/Node.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib.graph;
 
 import org.antlr.v4.runtime.tree.ParseTree;
@@ -21,9 +20,10 @@ import java.util.ArrayList;
 import java.util.Iterator;
 
 /**
- * A node of the graph (a method in the parse tree)
+ * A node of the graph (a method in the parse tree).
  */
 public class Node implements Iterable<Integer> {
+
     private Graph g;
     private String name;
     private ParseTree ctx;
@@ -48,10 +48,11 @@ public class Node implements Iterable<Integer> {
 
     /**
      * Adds an arrow to the node with the given index.
+     *
      * @param i - a node index.
      */
     public void add(int i) {
-        if(!dst.contains(i)) {
+        if (!dst.contains(i)) {
             dst.add(i);
         }
     }
@@ -66,6 +67,7 @@ public class Node implements Iterable<Integer> {
 
     /**
      * Sets the ANTLR parse tree node
+     *
      * @param ctx
      */
     public void setCtx(ParseTree ctx) {
@@ -74,7 +76,8 @@ public class Node implements Iterable<Integer> {
 
     /**
      *
-     * @return true if the method corresponding to the current node is recursive.
+     * @return true if the method corresponding to the current node is
+     * recursive.
      */
     public boolean isRecursive() {
         return recursive;
@@ -82,6 +85,7 @@ public class Node implements Iterable<Integer> {
 
     /**
      * Sets the isrecursive attribute to the boolean parameter value.
+     *
      * @param recursive
      */
     public void setRecursive(boolean recursive) {
@@ -89,14 +93,16 @@ public class Node implements Iterable<Integer> {
     }
 
     /**
-     * Sorts the arrows of this node using the order given in the parameter list.
+     * Sorts the arrows of this node using the order given in the parameter
+     * list.
+     *
      * @param order - an arraylist of node names.
      */
     public void sort(ArrayList<String> order) {
         ArrayList<Integer> res = new ArrayList<>(dst.size());
-        for(String i : order) {
+        for (String i : order) {
             int no = g.getNo(i);
-            if(dst.contains(no)) {
+            if (dst.contains(no)) {
                 res.add(no);
             }
         }
@@ -129,9 +135,9 @@ public class Node implements Iterable<Integer> {
 
     @Override
     public String toString() {
-        return "Node { " +
-                "name = '" + name + '\'' +
-                ", recursive = " + recursive +
-                " }";
+        return "Node { "
+                + "name = '" + name + '\''
+                + ", recursive = " + recursive
+                + " }";
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/lib/graph/Pair.java b/src/main/java/lib/graph/Pair.java
index fc2ff9df8edd8ad77ff319d664bc64bd43c1b26c..9122d1ffb48cbd254814df42174ec8662de86e7c 100644
--- a/src/main/java/lib/graph/Pair.java
+++ b/src/main/java/lib/graph/Pair.java
@@ -12,17 +12,17 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package lib.graph;
 
 import java.util.Iterator;
 
 /**
- * A pair associating a node number to an iterator corresponding to existing connections
- * used only during the DFS performed inside the Graph class.
+ * A pair associating a node number to an iterator corresponding to existing
+ * connections used only during the DFS performed inside the Graph class.
  */
 public class Pair {
+
     private int first;
     private Iterator<Integer> second;
 
diff --git a/src/main/java/view/EditorView.java b/src/main/java/view/EditorView.java
index 64f85ad5b3af6b3d18aaedd0cae73d75ba1a0a96..09f433832ac00ce486b9d93bb1fab054e3b61cb0 100644
--- a/src/main/java/view/EditorView.java
+++ b/src/main/java/view/EditorView.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package view;
 
 import complexityparser.Model;
@@ -30,7 +29,8 @@ import lib.Observable;
 import lib.Observer;
 
 /**
- * A basic view to display a text editor containing the code that is analysed and displayed by the ANTLR tree.
+ * A basic view to display a text editor containing the code that is analysed
+ * and displayed by the ANTLR tree.
  */
 public class EditorView extends JPanel implements Observer {
 
@@ -41,7 +41,7 @@ public class EditorView extends JPanel implements Observer {
     private Model m;
 
     public EditorView(Model m, MainFrame parent) {
-	m.addObserver(this);
+        m.addObserver(this);
         this.parent = parent;
         this.m = m;
         InputMap inputMap = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
@@ -56,15 +56,15 @@ public class EditorView extends JPanel implements Observer {
         Action action = new AbstractAction() {
             @Override
             public void actionPerformed(ActionEvent actionEvent) {
-		try{
-		    m.setSyntaxError(false);                
-		    String code = area.getText();
-               	    m.setCode(code);
-		} catch (IndexOutOfBoundsException e){
-		    area.setText(area.getText());
-		    m.setSyntaxError(true);
-		    m.update();
-		}
+                try {
+                    m.setSyntaxError(false);
+                    String code = area.getText();
+                    m.setCode(code);
+                } catch (IndexOutOfBoundsException e) {
+                    area.setText(area.getText());
+                    m.setSyntaxError(true);
+                    m.update();
+                }
             }
         };
         updateButton.addActionListener(action);
@@ -79,12 +79,12 @@ public class EditorView extends JPanel implements Observer {
             @Override
             public void actionPerformed(ActionEvent actionEvent) {
                 JFileChooser fc = new JFileChooser();
-		String s = System.getProperty("user.dir")+System.getProperty("file.separator")+"examples";
+                String s = System.getProperty("user.dir") + System.getProperty("file.separator") + "examples";
                 fc.setCurrentDirectory(new File(s));
-                if(JFileChooser.APPROVE_OPTION == fc.showOpenDialog(parent)) {
+                if (JFileChooser.APPROVE_OPTION == fc.showOpenDialog(parent)) {
                     File f = fc.getSelectedFile();
                     try {
-		        m.setSyntaxError(false);
+                        m.setSyntaxError(false);
                         byte[] res = Files.readAllBytes(f.toPath());
                         String txt = new String(res, StandardCharsets.UTF_8);
                         area.setText(txt);
@@ -92,12 +92,12 @@ public class EditorView extends JPanel implements Observer {
                         parent.setTitle(f.toString());
                     } catch (IOException e) {
                         e.printStackTrace();
-                    } catch (IndexOutOfBoundsException e){
-			area.setText(area.getText());
-			m.setSyntaxError(true);
-			m.update();
-			parent.setTitle(f.toString());
-		    }
+                    } catch (IndexOutOfBoundsException e) {
+                        area.setText(area.getText());
+                        m.setSyntaxError(true);
+                        m.update();
+                        parent.setTitle(f.toString());
+                    }
                 }
             }
         });
@@ -109,13 +109,13 @@ public class EditorView extends JPanel implements Observer {
                 area.transferFocus();
             }
         });
-	update(m);
+        update(m);
     }
 
     @Override
     public void update(Observable m) {
-	Model model = (Model) m;
-	area.setText(model.getCode());
-  	panel.setViewportView(area); 
+        Model model = (Model) m;
+        area.setText(model.getCode());
+        panel.setViewportView(area);
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/view/MainFrame.java b/src/main/java/view/MainFrame.java
index a8a1ba682aef0f6571ad7488920ee14b846eb882..bc860fd05d3c82e1d59955fc04546b064e4b579d 100644
--- a/src/main/java/view/MainFrame.java
+++ b/src/main/java/view/MainFrame.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package view;
 
 import complexityparser.Model;
@@ -38,9 +37,8 @@ public class MainFrame extends JFrame {
         setLayout(layout);
         add(new EditorView(m, this), BorderLayout.WEST);
         add(new TreePanel(m), BorderLayout.CENTER);
-        add(new MessageView(m), BorderLayout.EAST);
-	//add(new Menu(m,this));	
-	setJMenuBar(new Menu(m,this));
+        add(new MessageView(m), BorderLayout.EAST);	
+        setJMenuBar(new Menu(m, this));
         pack();
         //setSize(600,600);
     }
@@ -55,4 +53,4 @@ public class MainFrame extends JFrame {
             e.printStackTrace();
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/view/Menu.java b/src/main/java/view/Menu.java
index 4618b1be9d6176d9e8a5297cf481d209507388b0..0329a16d0ea2efc7920d5c3aefde2a61fec6cabf 100644
--- a/src/main/java/view/Menu.java
+++ b/src/main/java/view/Menu.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package view;
 
 import complexityparser.Model;
@@ -26,7 +25,8 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 
 /**
- * A basic view to display a text editor containing the code that is analysed and displayed by the ANTLR tree.
+ * A basic view to display a text editor containing the code that is analysed
+ * and displayed by the ANTLR tree.
  */
 public class Menu extends JMenuBar {
 
@@ -34,49 +34,45 @@ public class Menu extends JMenuBar {
     private MainFrame parent;
     private JTextArea area;
 
-    public Menu(Model m, MainFrame parent){
-	this.parent = parent;
-	this.m = m;
-	area = new JTextArea(m.getCode());
-	JMenu menu = new JMenu("File");
-	JMenuItem open = new JMenuItem("Open (CTRL+o)");
-	menu.add(open);
-	open.addActionListener(new ActionListener() 
-	{
-		public void actionPerformed(ActionEvent ae) 
-		{
-        		JFileChooser fc = new JFileChooser();
-	        	String s = System.getProperty("user.dir")+System.getProperty("file.separator")+"examples";
-             		fc.setCurrentDirectory(new File(s));
-			if(JFileChooser.APPROVE_OPTION == fc.showOpenDialog(parent)) {
-				File f = fc.getSelectedFile();
-				try {
-					m.setSyntaxError(false);
-			      		byte[] res = Files.readAllBytes(f.toPath());
-			   		String txt = new String(res, StandardCharsets.UTF_8);
-			  		area.setText(txt);
-					m.setCode(txt);	
-			  		parent.setTitle(f.toString());
-					m.update();		 
-				} catch (IOException e) {
-					e.printStackTrace();
-			   	} catch (IndexOutOfBoundsException e){
-					area.setText(area.getText());
-					m.setSyntaxError(true);
-					m.update();
-				}
-			}
-		   }
-	});
-	JMenuItem exit = new JMenuItem("Exit ComplexityParser");
-	menu.add(exit);
-	exit.addActionListener(new ActionListener() 
-	{
-		public void actionPerformed(ActionEvent e) 
-		{
-			System.exit(0);
-		}
-	});
-	add(menu);
+    public Menu(Model m, MainFrame parent) {
+        this.parent = parent;
+        this.m = m;
+        area = new JTextArea(m.getCode());
+        JMenu menu = new JMenu("File");
+        JMenuItem open = new JMenuItem("Open (CTRL+o)");
+        menu.add(open);
+        open.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent ae) {
+                JFileChooser fc = new JFileChooser();
+                String s = System.getProperty("user.dir") + System.getProperty("file.separator") + "examples";
+                fc.setCurrentDirectory(new File(s));
+                if (JFileChooser.APPROVE_OPTION == fc.showOpenDialog(parent)) {
+                    File f = fc.getSelectedFile();
+                    try {
+                        m.setSyntaxError(false);
+                        byte[] res = Files.readAllBytes(f.toPath());
+                        String txt = new String(res, StandardCharsets.UTF_8);
+                        area.setText(txt);
+                        m.setCode(txt);
+                        parent.setTitle(f.toString());
+                        m.update();
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    } catch (IndexOutOfBoundsException e) {
+                        area.setText(area.getText());
+                        m.setSyntaxError(true);
+                        m.update();
+                    }
+                }
+            }
+        });
+        JMenuItem exit = new JMenuItem("Exit ComplexityParser");
+        menu.add(exit);
+        exit.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                System.exit(0);
+            }
+        });
+        add(menu);
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/view/MessageView.java b/src/main/java/view/MessageView.java
index f1c5e92858228e02a5d0523dad42cd32eb200065..876c8456aacff0f4256c7976709b28f4a2b32ec9 100644
--- a/src/main/java/view/MessageView.java
+++ b/src/main/java/view/MessageView.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package view;
 
 import complexityparser.Model;
@@ -23,17 +22,17 @@ import javax.swing.*;
 import java.awt.*;
 
 /**
- * This class is used to show error and standard output caught by the model during the type analysis performed by the TierTypingListener class.
+ * This class is used to show error and standard output caught by the model
+ * during the type analysis performed by the TierTypingListener class.
  */
 public class MessageView extends JScrollPane implements Observer {
 
     private JTextArea area;
     private Model m;
 
- //   public void setTextArea(String txt){
-//	this.area = new TextArea(txt);
- //   }	
-
+    //   public void setTextArea(String txt){
+    //	this.area = new TextArea(txt);
+    //   }	
     public MessageView(Model m) {
         m.addObserver(this);
         this.m = m;
@@ -51,12 +50,12 @@ public class MessageView extends JScrollPane implements Observer {
         StringBuilder str = new StringBuilder();
         String out = m.getOutput();
         String err = m.getError();
-	if(m.getSyntaxError()){
-	    str.append("\n SYNTAX ERROR : This is not a syntactically correct Java \n program.\n");
-	}else{	
+        if (m.getSyntaxError()) {
+            str.append("\n SYNTAX ERROR : This is not a syntactically correct Java \n program.\n");
+        } else {
             str.append("Output:\n\n");
             str.append(out);
-            if(!err.equals("")) {
+            if (!err.equals("")) {
                 str.append("\n-------------------------------------------------\nErrors:\n\n");
                 str.append(m.getError());
             }
@@ -64,7 +63,7 @@ public class MessageView extends JScrollPane implements Observer {
             str.append("Final result: ");
             str.append(m.getResult());
             str.append("\n");
-	}
+        }
         area.setText(str.toString());
     }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/view/TreePanel.java b/src/main/java/view/TreePanel.java
index 90f91f1655628c7f36b0258cf11755d3d8e31766..dfd0deca36872f232c4ca5a242ed8dedf928603f 100644
--- a/src/main/java/view/TreePanel.java
+++ b/src/main/java/view/TreePanel.java
@@ -12,8 +12,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-*/
-
+ */
 package view;
 
 import complexityparser.Model;
@@ -49,12 +48,11 @@ public class TreePanel extends JScrollPane implements Observer {
     @Override
     public void update(Observable m) {
         Model model = (Model) m;
-	if(model.getSyntaxError()){
-            viewr = new TreeViewer(null,null);
-	}
-	else{
-       	    viewr = model.getTreeComponent();          
-	}
+        if (model.getSyntaxError()) {
+            viewr = new TreeViewer(null, null);
+        } else {
+            viewr = model.getTreeComponent();
+        }
         setViewportView(viewr);
     }
-}
\ No newline at end of file
+}