Code to get java code complexity I have Java function as input and want to get it's order for example O( n ) 
I search in the internet very hard but didn't find any thing can help me, is there any algorithms or package may help me.
No. There's no algorithm to analyze the asymptotic complexity of a piece of code given as input. Being able to do that would tell you whether the code halted and that's undecidable.