public void moveFunction(String func) {
			//travel the tree  
			//IASTFunctionCallExpression.FUNCTION_Name - IASTExpression (name) for IASTFunctionCallExpression
		 //   System.out.println("move: "+func );
			FunctionMover fm = functionMap.get(func);
		    List<String> list = fm.getFuncCallList();
		    for(int i = 0; i < fm.getFuncCallList().size(); i++)
		    {
		    	String tmp = list.get(i);
		    //	System.out.println("call: "+tmp);
		    	FunctionMover f = functionMap.get(tmp);
		    	if(null == f)
		    	{
		    	    continue;
		    	}
		    	if(f.vis)
		    	{
		    		continue;
		    	}
		    	moveFunction(tmp);
		    	f.vis = true;
		    	functionMap.remove(tmp);
		    	functionMap.put(tmp, f);
		    }
		    if(!"main".equals(func))
		    {
		    	//todo move the sub tree
		    	//tree[fm.numStmt]
		        Integer curPos = funcPosMap.get(func);
		        if(curPos==null)
		        {
		        	System.out.println("null:"+func);
		        	return;
		        }
		        while(curPos!=-1)
		        {
		        	if("IASTCompoundStatement.NESTED_STATEMENT - nested IASTStatement for IASTCompoundStatement".equals(tree[curPos].type))
		        	{
		        		break;
		        	}
		        	curPos = tree[curPos].father;
		        }
		     //   System.out.println("curPos: "+curPos);
		     //   System.out.println("beforeMOve");
		     //   for(int j=0;j<sonList[0].size();j++)
		     //   {
		     //   	System.out.printf("%d ",sonList[0].get(j));
		     //   }
		     //   System.out.println("");
		        Integer curFather = tree[curPos].father;
		        Integer oldFather = tree[fm.numDecl].father;
		     //   System.out.println("curpos: "+curPos+"  cur: "+curFather+"  old: "+oldFather);
		     //   System.out.println("stmt: "+fm.numStmt+"  "+"decl: "+fm.numDecl);
		        sonList[curFather].remove(curPos);
		        //sonList[curFather].add(fm.numStmt);
		        for(int j=0;j<sonList[fm.numStmt].size();j++)
		        {
		        	sonList[curFather].add(sonList[fm.numStmt].get(j));
		        }
		        sonList[oldFather].remove(fm.numDecl);
		     //   System.out.println("afterMOve");
		     //   for(int j=0;j<sonList[0].size();j++)
		     //   {
		     //   	System.out.printf("%d ",sonList[0].get(j));
		     //   }
		     //   System.out.println("");
		       /* System.out.println("after move:");
		        for(int j=0;j<sonList[curFather].size();j++)
		        {
		        	System.out.printf("%d ",sonList[curFather].get(j));
		        }
		        System.out.println("");*/
		    }
		}