This Article 
 Bibliographic References 
 Add to: 
A Survey of Software Refactoring
February 2004 (vol. 30 no. 2)
pp. 126-139

Abstract—This paper provides an extensive overview of existing research in the field of software refactoring. This research is compared and discussed based on a number of different criteria: the refactoring activities that are supported, the specific techniques and formalisms that are used for supporting these activities, the types of software artifacts that are being refactored, the important issues that need to be taken into account when building refactoring tool support, and the effect of refactoring on the software process. A running example is used throughout the paper to explain and illustrate the main concepts.

[1] D. Coleman, D. Ash, B. Lowther, and P. Oman, "Using Metrics to Evaluate Software System Maintainability," Computer, vol. 27, no. 8, pp. 44-49, Aug. 1994.
[2] T. Guimaraes, Managing Application Program Maintenance Expenditure Comm. ACM, vol. 26, no. 10, pp. 739-746, 1983.
[3] B.P. Lientz and E.B. Swanson, Software Maintenance Management: A Study of the Maintenance of Computer Application Software in 487 Data Processing Organizations. Addison-Wesley, 1980.
[4] R.L. Glass, Maintenance: Less Is Not More IEEE Software, July/Aug. 1998.
[5] R.S. Arnold, An Introduction to Software Restructuring Tutorial on Software Restructuring, R.S. Arnold, ed., 1986.
[6] W.F. Opdyke, Refactoring: A Program Restructuring Aid in Designing Object-Oriented Application Frameworks PhD thesis, Univ. of Illinois at Urbana-Champaign, 1992.
[7] M. Fowler, Refactoring: Improving the Design of Existing Programs. Addison-Wesley, 1999.
[8] E.J. Chikofsky and J.H. Cross II, "Reverse Engineering and Design Recovery: A Taxonomy," IEEE Software, Vol. 7, No. 1, Jan./Feb. 1990, pp. 13-17.
[9] S. Demeyer, S. Ducasse, and O. Nierstrasz, Object-Oriented Reengineering Patterns. Morgan Kaufmann and DPunkt, 2002.
[10] R. Fanta and V. Rajlich, Reengineering Object-Oriented Code Proc. Int'l Conf. Software Maintenance, pp. 238-246, 1998.
[11] R. Fanta and V. Rajlich, Restructuring Legacy C Code into C++ Proc. Int'l Conf. Software Maintenance, pp. 77-85, 1999.
[12] E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Languages and Systems. Addison-Wesley, 1994.
[13] M. ÓCinnéide and P. Nixon, Composite Refactorings for Java Programs technical report, Dept. of Computer Science, Univ. College Dublin, 2000.
[14] Y. Kataoka, M.D. Ernst, W.G. Griswold, and D. Notkin, Automated Support for Program Refactoring Using Invariants Proc. Int'l Conf. Software Maintenance, pp. 736-743, 2001.
[15] M. Balazinska, E. Merlo, M. Dagenais, and B. Lagüe, and K. Kontogiannis, Advanced Clone-Analysis to Support Object-Oriented System Refactoring Proc. Working Conf. Reverse Eng., pp. 98-107, 2000.
[16] S. Ducasse, M. Rieger, and S. Demeyer, A Language Independent Approach for Detecting Duplicated Code Proc. Int'l Conf. Software Maintenance (ICSM '99), pp. 109-118, Sept. 1999.
[17] T. Tourwé and T. Mens, Identifying Refactoring Opportunities Using Logic Meta Programming Proc. European Conf. Software Maintenance and Reeng., pp. 91-100, 2003.
[18] E. van Emden and L. Moonen, Java Quality Assurance by Detecting Code Smells Proc. Working Conf. Reverse Eng., pp. 97-108, 2002.
[19] T. Dudziak and J. Wloka, Tool-Supported Discovery and Refactoring of Structural Weaknesses in Code MS thesis, Faculty of Computer Science, Technical Univ. of Berlin, Feb. 2002.
[20] F. Simon, F. Steinbrückner, and C. Lewerentz, Metrics Based Refactoring Proc. European Conf. Software Maintenance and Reeng., pp. 30-38, 2001.
[21] M. Lanza and S. Ducasse, Understanding Software Evolution Using a Combination of Software Visualization and Software Metrics Proc. Langages et ModèlesàObjets, pp. 135-149, Aug. 2002.
[22] D. Alur, J. Crupi, and D. Malks, Core J2EE Patterns. Sun Microsystems Press, 2001.
[23] J.U. Pipka, Refactoring in a `Test First'-World Proc. Third Int'l Conf. eXtreme Programming and Flexible Processes in Software Eng., 2002.
[24] A. van Deursen and L. Moonen, The Video Store Revisited Thoughts on Refactoring and Testing Proc. Third Int'l Conf. eXtreme Programming and Flexible Processes in Software Eng., pp. 71-76, 2002.
[25] T. Mens, S. Demeyer, and D. Janssens, Formalising Behavior Preserving Program Transformations Graph Transformation, 2002.
[26] F. Tip, A. Kiezun, and D. Bäumer, Refactoring for Generalization Using Type Constraints Proc. SIGPLAN Conf. Object-Oriented Programming, Systems, Languages, and Applications, pp. 13-26, 2003.
[27] M. Proietti and A. Pettorossi, Semantics Preserving Transformation Rules for Prolog Proc. Symp. Partial Evaluation and Semantics-Based Program Evaluation, vol. 26, no. 9, pp. 274-284, May 1991.
[28] L. Tokuda and D.S. Batory, Evolving Object-Oriented Designs with Refactorings Automated Software Eng., vol. 8, no. 1, pp. 89-120, 2001.
[29] D. Sands, Total Correctness by Local Improvement in the Transformation of Functional Programs Trans. Programming Languages and Systems, vol. 18, no. 2, pp. 175-234, Mar. 1996.
[30] S. Demeyer, Maintainability versus Performance: What's the Effect of Introducing Polymorphism? technical report, Lab. on Reeng., Universiteit Antwerpen, Belgium, 2002.
[31] Y. Kataoka, T. Imai, H. Andou, and T. Fukaya, A Quantitative Evaluation of Maintainability Enhancement by Refactoring Proc. Int'l Conf. Software Maintenance, pp. 576-585, Oct. 2002.
[32] L. Tahvildari and K. Kontogiannis, A Methodology for Developing Transformations Using the Maintainability Soft-Goal Graph Proc. Working Conf. Reverse Eng., pp. 77-86, Oct. 2002.
[33] L. Tahvildari and K. Kontogiannis, A Metric-Based Approach to Enhance Design Quality through Meta-Pattern Transformations Proc. European Conf. Software Maintenance and Reeng., pp. 183-192, 2003.
[34] J. Grundy, J. Hosking, and W.B. Mugridge, Inconsistency Management for Multiple-View Software Development Environments IEEE Trans. Software Eng., vol. 24, no. 11, pp. 960-981, Nov. 1998.
[35] B. Nuseibeh, S. Easterbrook, and A. Russo, Leveraging Inconsistency in Software Development Computer, vol. 33, no. 4, pp. 24-29, Apr. 2000.
[36] G. Spanoudakis and A. Zisman, Inconsistency Management in Software Engineering: Survey and Open Research Issues Handbook of Software Eng. and Knowledge Eng., vol. 1, pp. 24-29, 2001.
[37] P. Bottoni, F. Parisi-Presicce, and G. Taentzer, Coordinated Distributed Diagram Transformation for Software Evolution Electronic Notes in Theoretical Computer Science, vol. 72, no. 4, 2002.
[38] V. Rajlich, A Model for Change Propagation Based on Graph Rewriting Proc. Int'l Conf. Software Maintenance, pp. 84-91, 1997.
[39] R. Van Der Straeten, J. Simmonds, T. Mens, and V. Jonckers, Using Description Logic to Maintain Consistency between UML Models Proc. Unified Modeling Language Conf. 2003, 2003.
[40] J. Banerjee and W. Kim, Semantics and Implementation of Schema Evolution in Object-Oriented Databases Proc. SIGMOD Conf., 1987.
[41] D. Roberts, Practical Analysis for Refactoring PhD thesis, Univ. of Illinois at Urbana-Champaign, 1999.
[42] M.P. Ward and K.H. Bennett, Formal Methods to Aid the Evolution of Software Int'l J. Software Eng. and Knowledge Eng., vol. 5, no. 1, pp. 25-47, 1995.
[43] R. Heckel, Algebraic Graph Transformations with Application Conditions MS thesis, TU Berlin, 1995.
[44] D. Roberts, J. Brant, and R.E. Johnson, A Refactoring Tool for Smalltalk Theory and Practice of Object Systems, vol. 3, no. 4, pp. 253-263, 1997.
[45] A. Habel, R. Heckel, and G. Täntzer, Graph Grammars with Negative Application Conditions Fundamenta Informaticae, vol. 26, nos. 3 and 4, pp. 287-313, June 1996.
[46] N. Van Eetvelde and D. Janssens, A Hierarchical Program Representation for Refactoring Proc. UniGra'03 Workshop, 2003.
[47] M. Weiser, Program Slicing IEEE Trans. Software Eng., vol. 10, no. 4, pp. 352-357, 1984.
[48] F. Lanubile and G. Visaggio, Extracting Reusable Functions by Flow Graph-Based Program Slicing IEEE Trans. Software Eng., vol. 23, no. 4, pp. 246-258, Apr. 1997.
[49] A. Lakhotia and J.-C. Deprez, Restructuring Programs by Tucking Statements into Functions Information and Software Technology, special issue on program slicing, vol. 40, pp. 677-689, 1998.
[50] R. Komondoor and S. Horwitz, Semantics-Preserving Procedure Extraction technical report, Computer Sciences Dept., Univ. of Wisconsin-Madison, 2000.
[51] L. Larsen and M.J. Harrold, ”Slicing Object-Oriented Software,” Proc. Int'l Conf. Software Eng., pp. 495–505, Mar. 1996.
[52] B. Ganter and R. Wille, Formal Concept Analysis: Mathematical Foundations. Springer-Verlag, 1999.
[53] G. Snelting and F. Tip, Reengineering Class Hierarchies Using Concept Analysis Proc. Foundations of Software Eng., pp. 99-110, 1998.
[54] P. Tonella, “Concept Analysis for Module Restructuring,” IEEE Trans. Software Eng., vol. 27, no. 4, pp. 351-363, Apr. 2001.
[55] A. van Deursen and T. Kuipers, “Identifying Objects Using Cluster and Concept Analysis,” Proc. 21st Int'l Conf. Software Eng., pp. 246-255, 1999.
[56] J. Philipps and B. Rumpe, Roots of Refactoring Proc. 10th OOPSLA Workshop Behavioral Semantics, 2001.
[57] N. Wirth, Program Development by Stepwise Refinement Comm. ACM, vol. 14, pp. 221-227, 1971.
[58] R.-J. Back, Correctness Preserving Program Refinements technical report, Math. Centre Tracts #131, Mathematisch Centrum Amsterdam, 1980.
[59] J. Philipps and B. Rumpe, Refinement of Information Flow Architectures Proc. Int'l Conf. Formal Eng. Methods, 1997.
[60] S. Demeyer, S. Ducasse, and O. Nierstrasz, Finding Refactorings via Change Metrics Proc. Object-Oriented Programming, Systems, Languages, Applications Conf. 2000, vol. 35, no. 10, pp. 166-177, Oct. 2000.
[61] D. Coleman, P. Arnold, S. Bdoff, H. Gilchrist, F. Hayes, and P. Jeremaes, Object-Oriented Development: The Fusion Method. Prentice Hall, 1994.
[62] W.G. Griswold, M.I. Chen, R.W. Bowdidge, and J.D. Morgenthaler, Tool Support for Planning the Restructuring of Data Abstractions in Large Systems Proc. SIGSOFT Symp. Foundations of Software Eng., Oct. 1996.
[63] D. Gupta, P. Jalote, and G. Barua, “A Formal Framework for On-Line Software Version Change,” IEEE Trans. Software Eng., vol. 22, no. 2, pp. 120–131, Feb. 1996.
[64] I. Moore, Automatic Inheritance Hierarchy Restructuring and Method Refactoring Proc. Object-Oriented Programming, Systems, Languages, Applications Conf., pp. 235-250, 1996.
[65] R.E. Mortimer and K.H. Bennett, Maintenance and Abstraction of Program Data Using Formal Transformations Proc. Int'l Conf. Software Maintenance, pp. 301-311, 1996.
[66] P.L. Bergstein, Object-Preserving Class Transformations SIGPLAN Notices, vol. 26, no. 11, pp. 299-313, Nov. 1991.
[67] P.L. Bergstein, Maintenance of Object-Oriented Systems during Structural Evolution Theory and Practice of Object Systems, vol. 3, no. 3, pp. 185-212, 1991.
[68] S.H. Hwang, Y. Tsujino, and N. Tokura, A Reorganization Framework of the Object-Oriented Class Hierarchy Proc. Asia Pacific Conf. Software Eng., pp. 117-126, 1995.
[69] W.L. Hürsch and L.M. Seiter, Automating the Evolution of Object-Oriented Systems Proc. Symp. Object Technology for Advanced Software, pp. 2-21, 1996.
[70] H. Tamaki and T. Sato, Unfold/Fold Transformation of Logic Programs Proc. Int'l Conf. Logic Programming, pp. 127-138, 1984.
[71] T. Kawamura and T. Kanamori, Preservation of Stronger Equivalence in Unfold/Fold Logic Program Transformation Proc. Int'l Conf. Fifth Generation Computer Systems, pp. 413-422, 1988.
[72] N. Jones and A. Mycroft, Stepwise Development of Operational and Denotational Semantics for Prolog Proc. Int'l Symp. Logic Programming, pp. 289-298, 1984.
[73] F. Bodin, Sage++: An Object-Oriented Toolkit and Class Library for Building Fortran and C++ Restructuring Tools Proc. Conf. Object-Oriented Numerics, 1994.
[74] C.T.H. Everaars, F. Arbab, and F.J. Burger, Restructuring Sequential Fortran Code into a Parallel/Distributed Application Proc. Int'l Conf. Software Maintenance, pp. 13-22, 1996.
[75] J.C. Miller and B.M. Strauss, Implications of Automatic Restructuring of Cobol SIGPLAN Notices, vol. 22, pp. 76-82, June 1987.
[76] T.J. Harmer, P.J. McParland, and J.M. Boyle, Using Knowledge-Based Transformations to Reverse-Engineer COBOL Programs Proc. Conf. Knowledge Based Software Eng., pp. 114-123, 1996.
[77] A. Garrido and R. Johnson, Challenges of Refactoring C Programs Proc. Int'l Workshop Principles of Software Evolution, 2002.
[78] M. Vittek, Refactoring Browser with Preprocessor Proc. European Conf. Software Maintenance and Reeng., pp. 101-110, 2003.
[79] W.G. Griswold and D. Notkin, Automated Assistance for Program Restructuring Trans. Software Eng. and Methodology, vol. 2, no. 3, pp. 228-269, July 1993.
[80] A.M. Leitão, A Formal Pattern Language for Refactoring of Lisp Programs Proc. European Conf. Software Maintenance and Reeng., pp. 186-192, 2002.
[81] F. Muñoz, A Logic Metaprogramming Framework for Supporting the Refactoring Process MS thesis, Vrije Universiteit Brussel, Sept. 2003.
[82] R. Lämmel, Reuse by Program Transformation Functional Programming Trends, 1999.
[83] H. Li, S. Thompson, and C. Reinke, Tool Support for Refactoring Functional Programs Proc. SIGPLAN Workshop Haskell, pp. 27-38, 2003.
[84] A. Pettorossi and M. Proietti, Rules and Strategies for Transforming Functional and Logic Programs ACM Computing Surveys, vol. 28, no. 2, pp. 360-414, June 1996.
[85] A. Power and L. Sterling, A Notion of Map between Logic Programs Proc. Int'l Conf. Logic Programming, pp. 390-404, 1990.
[86] J. Farrell, Make Bad Code Good Refactor Broken Java Code for Fun and Profit JavaWorld, Mar. 2001.
[87] R. Najjar, S. Counsell, G. Loizou, and K. Mannock, The Role of Constructors in the Context of Refactoring Large-Scale Object-Oriented Systems Proc. European Conf. Software Maintenance and Reeng., pp. 111-122, 2003.
[88] T. Genssler, B. Mohr, B. Schulz, and W. Zimmer, On the Computer Aided Introduction of Design Patterns into Object-Oriented Systems Proc. TOOLS Conf., 1998.
[89] W.F. Opdyke, Refactoring C++ Programs technical report, Lucent Technologies/Bell Labs, 1999.
[90] W. Scherlis, Systematic Change of Data Representation: Program Manipulations and Case Study Proc. European Symp. Programming, 1998.
[91] L. Tokuda and D.S. Batory, Automated Software Evolution via Design Pattern Transformations Proc. Int'l Symp. Applied Corporate Computing, Oct. 1995.
[92] P. Borba and S. Soares, Refactoring and Code Generation Tools for AspectJ Proc. OOPSLA 2002 Workshop Tools for Aspect-Oriented Software Development, Nov. 2002.
[93] D. Astels, Refactoring with UML Proc. Int'l Conf. eXtreme Programming and Flexible Processes in Software Eng., pp. 67-70, 2002.
[94] G. Sunyé, D. Pollet, Y. LeTraon, and J.-M. Jézéquell, Refactoring UML Models Proc. Unified Modeling Language Conf. 2001, 2001.
[95] M. Boger, T. Sturm, and P. Fragemann, Refactoring Browser for UML Proc. Int'l Conf. eXtreme Programming and Flexible Processes in Software Eng., pp. 77-81, 2002.
[96] P. Van Gorp, H. Stenten, T. Mens, and S. Demeyer, Towards Automating Source Consistent UML Refactorings Proc. Unified Modeling Language Conf., 2003.
[97] J.H. Jahnke and A. Zündorf, Rewriting Poor Design Patterns by Good Design Patterns Proc. ESEC/FSE '97 Workshop Object-Oriented Reeng., 1997.
[98] A. Russo, B.A. Nuseibeh, and J. Kramer, "Restructuring Requirements Specifications for Inconsistency Analysis: A Case Study," Third Int'l Conf. Requirements Engineering, IEEE CS Press, Los Alamitos, Calif., 1998, pp. 51-60.
[99] E. Casais, Automatic Reorganization of Object-Oriented Hierarchies: A Case Study Object Oriented Systems, vol. 1, pp. 95-115, 1994.
[100] T. Tourwé and W. De Meuter, Optimizing Object-Oriented Languages through Architectural Transformations Proc. Int'l Conf. Compiler Construction, 1999.
[101] F.W. Callis, Problems with Automatic Restructurers SIGPLAN Notices, vol. 23, pp. 13-21, Mar. 1988.
[102] T. Mens, A Formal Foundation for Object-Oriented Software Evolution PhD thesis, Dept. of Computer Science, Vrije Universiteit Brussel, Belgium, Sept. 1999.
[103] M. ÓCinnéide and P. Nixon, A Methodology for the Automated Introduction of Design Patterns Proc. Int'l Conf. Software Maintenance, pp. 463-474, 1999.
[104] R. Lämmel, Towards Generic Refactoring Proc. SIGPLAN Workshop Rule-Based Programming, 2002.
[105] S. Tichelaar, S. Ducasse, S. Demeyer, and O. Nierstrasz, A Meta-Model for Language-Independent Refactoring Proc. Int'l Symp. Principles of Software Evolution, pp. 157-169, 2000.
[106] C. Atkinson and T. Kühne, The Role of Meta-Modeling in MDA Proc. UML 2002 Workshop Software Model Eng., pp. 67-70, Oct. 2002.
[107] K. Beck, Extreme Programming Explained: Embrace Change. Addison Wesley, 2000.
[108] A. van Deursen, L. Moonen, A. van den Bergh, and G. Kok, Refactoring Test Code Extreme Programming Perspectives, M. Marchesi, ed., pp. 92-95, 2001.
[109] T. Mens and T. Tourwé, A Declarative Evolution Framework for Object-Oriented Design Patterns Proc. Int'l Conf. Software Maintenance, pp. 570-579, 2001.
[110] P. Baldan, A. Corradini, H. Ehrig, M. Löwe, U. Montanari, and F. Rossi, Handbook of Graph Grammars and Graph Transformation, pp. 107-188, World Scientific, 1999.
[111] R. Heckel, J.M. Küster, and G. Taentzer, Confluence of Typed Attributed Graph Transformation Systems Graph Transformation, 2002.

Index Terms:
Coding tools and techniques, programming environments/construction tools, restructuring, reverse engineering, and reengineering.
Tom Mens, Tom Tourw?, "A Survey of Software Refactoring," IEEE Transactions on Software Engineering, vol. 30, no. 2, pp. 126-139, Feb. 2004, doi:10.1109/TSE.2004.1265817
Usage of this product signifies your acceptance of the Terms of Use.