As we know that it is easy to refactor the code manually but can it be possible to refactor the code automatically.In other words, I want to write the code in such a manner that whenever I will give some code to system then it will do the refactoring automatically. It can be possible in only one way by using of file handling but how I don't know. I had tried a lot about automated refactoring of Long Method but i didn't get any scope from where i will start. S