2002 · 170 citations · 19 references
ComputingComputer ScienceProgramming LanguagesSoftware EngineeringSystems ProgrammingSoftware DesignSoftware MaintenanceSoftware RefactoringStatic Code AnalysisAutomated RefactoringInvariant Feature DetectionInvariantsProgram InvariantsRefactoringRefactoring Detection
Program refactoring, which improves readability, structure, performance, abstraction, and maintainability, is underutilized largely because identifying suitable candidates and selecting appropriate transformations is costly. This study demonstrates that it is feasible to automatically locate program locations that are suitable for specific refactorings. By detecting invariant patterns with Daikon and matching them against predefined refactoring templates, the authors automatically identified refactoring opportunities in a Java codebase. The approach uncovered numerous refactoring opportunities, and a developer of the codebase evaluated their effectiveness.
Program refactoring-transforming a program to improve readability, structure, performance, abstraction, maintainability, or other features-is not applied in practice as much as might be desired. One deterrent is the cost of detecting candidates for refactoring and of choosing the appropriate refactoring transformation. This paper demonstrates the feasibility of automatically finding places in the program that are candidates for specific refactorings. The approach uses program invariants: when a particular pattern of invariant relationships appears at a program point, a specific refactoring is applicable. Since most programs lack explicit invariants, an invariant detection tool called Daikon is used to infer the required invariants. We developed an invariant pattern matcher for several common refactorings and applied it to an existing Java code base. Numerous refactorings were detected, and one of the developers of the code base assessed their efficacy.
19
Refactoring object-oriented frameworks
William F. Opdyke · 1992 · 1K citations
David Ungar, Randall B. Smith · 1987 · 909 citations
A refactoring tool for smalltalk
Don Roberts, John Brant, Ralph E. Johnson · Theory and Practice of Object Systems · 1997 · 355 citations
Quickly detecting relevant program invariants
Michael D. Enst, Adam Czeisler, William G. Griswold et al. · 2000 · 256 citations · Full text