作者: Y. Kataoka , M.D. Ernst , W.G. Griswold , D. Notkin
关键词: Code refactoring 、 Structure (mathematical logic) 、 Computer science 、 Abstraction (linguistics) 、 Maintainability 、 Software maintenance 、 Static analysis 、 Programming language 、 Invariant (mathematics) 、 Code (cryptography)
摘要: Program refactoring-transforming a program to improve readability, structure, performance, abstraction, maintainability, or other features-is not applied in practice as much might be desired. One deterrent is the cost of detecting candidates for refactoring and choosing appropriate transformation. This paper demonstrates feasibility automatically finding places that are specific refactorings. The approach uses invariants: when particular pattern invariant relationships appears at point, applicable. Since most programs lack explicit invariants, an detection tool called Daikon used infer required invariants. We developed matcher several common refactorings it existing Java code base. Numerous were detected, one developers base assessed their efficacy.