I was familiar with script statements but didn't knew we have code statements error also in APEX.
Just to clarify, as it sounds like you might be confused about the terminology: "Apex Statements", "Code Statements", and "Script Statements" are all talking about the same thing - so you'll need to first see if you can improve efficiency, then maybe consider whether you can run the offending code asynchronously in a @future method.
If your code is particularly complex, I find it helps to write out a pseudo-code version of what you're running, and try and simplify on paper, then implement; rather than hacking at it haphazardly :)