Refactoring is a technique to restructure code in a disciplined way, and is well suited to tool support, though extant tools are rather basic. Refactoring is common and vital practice in object-oriented programming, Forth programming, and forms a central part of the Extreme Programming methodology.
Tools, almost always pure software, to help refactor (restructure) computer code, especially inheritance hierarchies. All such software automatically analyzes code. Some of it automatically refactors code. Some even automatically deletes duplicate code. Such tools are most useful for Forth, and object-oriented code, and even more so for prototype-based code.