private void parsingCodeLine(String codeLine) throws GitAPIException, IOException {
	   
       StringTokenizer tokenizer = new StringTokenizer(codeLine);
       
       // checks whether the code line outside a method is empty
       if(!tokenizer.hasMoreTokens()) {
    	   return;
       }else {
    	   String token = tokenizer.nextToken();
    	   
    	   
    	   if(token.contains("package") && !lineInMethod) {  
    		   token = tokenizer.nextToken();
                
    		   StringTokenizer tempTokenizer = new StringTokenizer(token, ";");
    		   cityName = tempTokenizer.nextToken();
            
    		   return;    
    	   }else if (token.contains("import") && !lineInMethod) {
    		   return;
    	   }
    	   
    	   // filter the code line that is outside a method and contains no actual codes such as comments
           if (currentLine.contains("/*") && currentLine.contains("*/")){
        	   
        	   if(token.charAt(0) == '/' && token.charAt(1) == '*') {
        		   
        		   StringTokenizer tempTokenizer = tokenizer;
        		   String tempToken = null;
        		   while(tempTokenizer.hasMoreTokens()) {
          				tempToken = tempTokenizer.nextToken();
        		   }
        		   
        		   int lastIndex = tempToken.length() - 1;
        		   if(tempToken.charAt(lastIndex - 1) == '*' && tempToken.charAt(lastIndex) == '/') {
        			   return;
        		   }
        	   }
           }
           
           // filter the code line that is outside a method and contains no actual codes such as comments
           if(currentLine.contains("*/") && blockCommentHandler == 1 && !currentLine.contains("\"/*\"")) {
        	   blockCommentHandler = -1;
               return;
           }else if(blockCommentHandler == 1) {
        	   return;
           }else if(currentLine.contains("/*") && !currentLine.contains("*/") && !currentLine.contains("\"/*\"")) {
        	   if(token.charAt(0) == '/'  && token.charAt(1) == '*') {
          			blockCommentHandler = 1;
          			return;
          		}
        	   blockCommentHandler = 1;
           }
           
           if(token.contains("//") && !lineInMethod) {  
        	   return;
           }else if(currentLine.contains("@") && !tokenizer.hasMoreTokens()) {
        	   return;
           }else {
        	   // the line will contain one of these: method contents, class name, variable name.
        	   
        	   if(token.charAt(0) == '/') {
        		   return;
        	   }
           
        	   // checks whether the code line is related to a method
               if(lineInMethod) {
            	   // filter the code line that is inside a method
            	   if(currentLine.contains("{") || currentLine.contains("}")) {
            		   int result = 0;
            		   
                       // only check first most character and the last most character 
                       // case 1: both '{' and '}' can be in the same line
            		   if(currentLine.contains("{") && currentLine.contains("}")) {
            			   
            			   StringTokenizer tempTokenizer = null;
                    	   boolean openParenthesis = false;
                    	   
                    	   if(token.charAt(0) == '}') {
                    		   result--;
                    	   }else if(token.charAt(0) == '{') {
                    		   openParenthesis = true;
                    		   tempTokenizer = new StringTokenizer(currentLine, ")");
                               result++;
                    	   }
                    	   
                           if(currentLine.contains("//") && !currentLine.contains("\"//\"")) {
                        	   StringTokenizer tokenizera = new StringTokenizer(token, "//");
                               tokenizer = tokenizera;
                           }   	
                           
                           while(tokenizer.hasMoreTokens()) {
                               token = tokenizer.nextToken();
                           }
                           
                           
                           boolean commentedOut = false;
                       
                           if(blockCommentHandler == 1) {
                        	  	if(openParenthesis) {
                               		StringTokenizer tempTokenizer2 = new StringTokenizer(currentLine, "/*");
                               		StringTokenizer tempTokenizer3 = new StringTokenizer(currentLine, "}");
                               		
                               		String tempToken2 = tempTokenizer2.nextToken();
                               		String tempToken3 = tempTokenizer3.nextToken();
                               		
                               		if(tempToken2.length() < tempToken3.length()) {
                               			commentedOut = true;
                               		}
                               		
                        	  	}else {
                               		StringTokenizer tempTokenizer2 = new StringTokenizer(currentLine, "/*");
                               		StringTokenizer tempTokenizer3 = new StringTokenizer(currentLine, "{");
                               		
                               		String tempToken2 = tempTokenizer2.nextToken();
                               		String tempToken3 = tempTokenizer3.nextToken();
                               		
                               		if(tempToken2.length() < tempToken3.length()) {
                               			commentedOut = true;
                               		}
                        	  	}
                           }
                                               
                           int lastIndex = token.length() - 1;
                           if (token.charAt(lastIndex) == '}' && !commentedOut) {
                        		if(!openParenthesis) {
                        			result = 0;
                        		}else {
                        			tempTokenizer.nextToken();
                           			String theToken = tempTokenizer.nextToken();
                           			if(theToken.contains("{") && theToken.contains("}")) {
                           				// do not change the 'result'
                           			}else {
                           				result--;
                           			}
                  
                        		}                       
                           }else if(token.charAt(lastIndex) == '{' && !commentedOut) {
                               result++;
                           }
                                                       
                       // case2: only one of '{' and '}' is in the line  
            		   }else {
            			   
            			   if(token.charAt(0) == '}') { 
            				   result--;
            		       }else if (token.charAt(0) == '{') {             
            		    	   result++;
            		       }else {           
            		    		if(currentLine.contains("//") && !currentLine.contains("\"//\"")) {
            		    			String token3 = null;
                           			StringTokenizer tempTokenizer = new StringTokenizer(currentLine, "//");
                           			
                           			token3 = tempTokenizer.nextToken();
                           			StringTokenizer tempTokenizer2 = new StringTokenizer(token3);        		
                           			while(tempTokenizer2.hasMoreTokens()) {
                           				token3 = tempTokenizer2.nextToken();
                           			}
                          			int lastIndex = token3.length() - 1;
                                               			
                           			if(token3.charAt(lastIndex) == '}') {
                           				result--;
                           			}else if(token3.charAt(lastIndex) == '{') {
                           	      		result++; 		
                           			}else if(currentLine.contains("{")) {
                          				if(!currentLine.contains("\"{\"") && !currentLine.contains("'{'")) {
                           					result++;
                           				}        		
                           			}else if(currentLine.contains("}")) {
                           				if(!currentLine.contains("\"}\"") && !currentLine.contains("'}'")) {
                           					result--;
                           				}
                           			}
            		    		}else {
                                               		
                           			while(tokenizer.hasMoreTokens()) {
                           				token = tokenizer.nextToken();
                           			}
                           		    
                           			int lastIndex = token.length() - 1; 
                           			if(token.charAt(lastIndex) == '}') {
                           				result--;
                           			}else if(token.charAt(lastIndex) == '{') {
                           				result++;
                           			}else if(currentLine.contains("{")) {
                           				if(!currentLine.contains("\"{\"") && !currentLine.contains("'{'")) {
                           					result++;
                                               				
                           				}
                           			}else if(currentLine.contains("}")) {
                           				if(!currentLine.contains("\"}\"") && !currentLine.contains("'}'")) {
                           					result--;
                                               		
                           				}
                           			}
            		    		}
            		       }
            		   }
            		   
            		   methodHandler += result;
                  
            		   if(methodHandler == -1) {        
                                    
            			   lineInMethod = false;        
                           
                           PersonIdent ownership = parsedClass.getAuthor(currentLineNum);
                           if (ownership == null) {
                        	   int a = 0;
                           }
                           Author author = getUniqueAuthor(ownership);
                           currentMethod.increOwnershipSize(author);
                           
                           createdClassObjects.get(classHandler).addFloor(currentMethod);
                           return;
            		   }
            	   }
            	   PersonIdent ownership = parsedClass.getAuthor(currentLineNum);
                   Author author = getUniqueAuthor(ownership);
                   currentMethod.increOwnershipSize(author);        
                                                       
               }else if(classHandler > -1 && currentLine.contains("}") && !currentLine.contains("{") && classCreated && !currentLine.contains("},") && !currentLine.contains("};")&& !currentLine.contains(");")) {
                       	
            		classFinishes++;
                       	
            		if(classHandler == 1) {
                   		classHandler = 0;
                   	}else if(classHandler == 0) {
                   		classHandler = -1;
                   	}else {
                       	classHandler -= classFinishes;
                   	}   	
 
               }else {
                       	
            		if(token.contains("@")) {
            			if(token.contains("Override") || token.contains("SuppressWarnings") || token.contains("ExportAttribute")) {
            				token = tokenizer.nextToken();
            			}else {
            				tokenizer.nextToken();
               				token = tokenizer.nextToken();
               			}
               		}
                                                               
            		if(token.equals("public") || token.equals("private") || token.equals("protected")) {
                        token = tokenizer.nextToken();
            		}
            		
            		if(token.equals("final")) {
            			token = tokenizer.nextToken();
                                       
                        if(token.contains("public")) {
                        	token = tokenizer.nextToken();
                         }
            		}
                               
            		if(token.equals("static")) {
            			if(!currentLine.contains("(")) {
            				classCreated = false;
            			}
                               		
            			if(tokenizer.hasMoreTokens()) {
            				token = tokenizer.nextToken();
                               			
            				if(token.equals("public") || token.equals("private")) {
            					token = tokenizer.nextToken();
            				}
            				if(token.equals("final")) {
            					token = tokenizer.nextToken();
            				}
            			}else {
            				return;
            			}
            		}
                               
            		if(token.equals("native")) {
            			token = tokenizer.nextToken();
            		 }
                               
            		if(token.equals("synchronized")) {
            			token = tokenizer.nextToken();
            		}
                               
            		if(token.equals("enum")) {
            			token = tokenizer.nextToken();
            			
            			if(!token.equals("class")) {
            				StringTokenizer tempTokenizer = new StringTokenizer(token, "{");
            				String className = tempTokenizer.nextToken();
                                                       
            				classCreator(className);
            				return;
            			}      
            		}                
   
            		if(token.equals("class") || token.equals("interface")) {
            			
            			token = tokenizer.nextToken();
            			String className = null;
                          
            			StringTokenizer tempTokenizer = new StringTokenizer(token, "{");
                       	className = tempTokenizer.nextToken();
     
                        classCreator(className);
                        return;     

            		}else if(token.equals("abstract") && !currentLine.contains("(")) {
            			tokenizer.nextToken();
                        token = tokenizer.nextToken();
                       
                        if(token.equals("public")) {
                        	token = tokenizer.nextToken();
                        }
                                       
                        if(token.equals("class")) {
                           	token = tokenizer.nextToken();
                        }
                                       
                        StringTokenizer tempTokenizer = new StringTokenizer(token, "{");
                        String className = tempTokenizer.nextToken();
                                               
                        classCreator(className);
                        return;       
                        
            		}else {
            			// the line contains only variable
            			if(!currentLine.contains("(") || currentLine.contains("),")) {
                   			return;
            			}
                  
            			// the line will contain method contents    	
                        
                        // the method could be the constructor
            			String currentTowerName = createdClassObjects.get(classHandler).getTowerName();
                   		String methodType = null;
                   		if(token.contains("(")) {
                   			StringTokenizer tempTokenizer = new StringTokenizer(token, "(");
                   			methodType = tempTokenizer.nextToken();  
                   		}else {
                   			methodType = token;
                   		}	 
                   		
                   		if(currentTowerName.contains("<")) {	
                 			StringTokenizer tempTokenizer = new StringTokenizer(currentTowerName, "<");
                 			currentTowerName = tempTokenizer.nextToken();
                   		}
                   		
                   		if(methodType.equals(currentTowerName)) {
                   			
                   			if(currentLine.contains("{") && currentLine.contains("}")) {
                   				isConstructor = true;
                   			}
                               		 
                   			if(currentLine.contains(";") && !currentLine.contains("{") && !currentLine.contains("}")) {
                               	return;
                   			}
                               			
                   			String methodName = methodType;   		
                   			methodCreator(methodName);
           
                   		}else {        
        
                       		if(!tokenizer.hasMoreTokens()) {
                       			return;
                       		}
                                       		
                       		String tempToken = null;
                       		StringTokenizer tempTokenizer = new StringTokenizer(currentLine);
                       		tempToken = tempTokenizer.nextToken();
                       		if(tempToken.equals("public") || tempToken.equals("private")) {
                       			tempToken = tempTokenizer.nextToken();
                       		}
                                       		
                                       		
                       		if(token.contains("<")) {
                   				if(token.charAt(0) == '<') {
                   					
                   					if(!token.contains(">")) {
                   						token = tokenizer.nextToken();
                   						tempToken = tempTokenizer.nextToken();
                   						while(!token.contains(">")) {
                   							token = tokenizer.nextToken();
                   							tempToken = tempTokenizer.nextToken();
                   						}
                   					}
        				
                   					tempToken = tempTokenizer.nextToken();
                   					if(!tempToken.contains("(")) {
                   						token = tokenizer.nextToken();
                   						
                   					}
                                       					
                                       					
                   					if(token.contains("<")) {
                   						if(!token.contains(">")) {
                   							while(!token.contains(">")) {
                   								token = tokenizer.nextToken();
                   							}
                   						}
                   					}
                                       					
                   				}else {
                   					int lastIndex = token.length() - 1;
                   					while(token.charAt(lastIndex) != '>') {
                   						token = tokenizer.nextToken();
                   						lastIndex = token.length() - 1;
                   					}
                   				}
                       		}

                   			token = tokenizer.nextToken();
                   			if(token.contains("(")) {         
                   				                       
                   				if(currentLine.contains("{") && currentLine.contains("}")) {
                                    isConstructor = true;
                   				}
                   				if(currentLine.contains(";") && !currentLine.contains("}") && !currentLine.contains("}")) {
                                   	return;
                   				}
                   				
                                StringTokenizer tempTokenizer2 = new StringTokenizer(token, "(");
                                String methodName = tempTokenizer2.nextToken();
                                methodCreator(methodName);                                                                        
                   			}else {
                   				String methodName = token;
                   				if(tokenizer.hasMoreTokens()) {
                   					token = tokenizer.nextToken();
                   				    if(token.contains("(")) {
                   				    	if(currentLine.contains("{") && currentLine.contains("}")) {
                                   	 		isConstructor = true;
                   				    	}
                   				    	methodCreator(methodName);
                   				    }else {
                   				    	return;
                   				    }
                   				}
                   			}        
                   		}
            		}
               }
           }
       }
   }