Restructuring source code to improve its internal structure without changing its external behaviour.
Refactoring was popularized by Martin Fowler and aims at improving source code quality. The basic philosophy is to identify small, atomic, refactoring steps that improve the internal structure of the code but do not change its external behaviour. The supposed simplicity of these steps must guarantee their correctness.
Atomic steps can be combined to create large and complex refactorings. The major Interactive Development Environements -- Eclipse, IntelliJ, Visual Studio -- provide interactive support for refactoring.
Some well-known refactorings are: