Source Code Rejuvenation Is Not Refactoring

  • Peter Pirkelbauer
  • Damian Dechev
  • Bjarne Stroustrup
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5901)


Programmers rely on programming idioms, design patterns, and workaround techniques to make up for missing programming language support. Evolving languages often address frequently encountered problems by adding language and library support to subsequent releases. By using new features, programmers can express their intent more directly. As new concerns, such as parallelism or security, arise, early idioms and language facilities can become serious liabilities. Modern code sometimes benefits from optimization techniques not feasible for code that uses less expressive constructs. Manual source code migration is expensive, time-consuming, and prone to errors.

In this paper, we present the notion of source code rejuvenation, the automated migration of legacy code and very briefly mention the tools we use to achieve that. While refactoring improves structurally inadequate source code, source code rejuvenation leverages enhanced program language and library facilities by finding and replacing coding patterns that can be expressed through higher-level software abstractions. Raising the level of abstraction benefits software maintainability, security, and performance.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Ritchie, D.M.: The Development of the C Language. In: HOPL-II: The Second ACM SIGPLAN Conference on History of Programming Languages, New York, pp. 201–208. ACM, New York (1993)CrossRefGoogle Scholar
  2. 2.
    Stroustrup, B.: The Design and Evolution of C++. ACM Press/Addison-Wesley Publishing Co. (1994)Google Scholar
  3. 3.
    ISO/IEC 14882 International Standard: Programming Languages: C++. American National Standards Institute (September 1998)Google Scholar
  4. 4.
    Stroustrup, B.: The Design of C++0x. C/C++ Users Journal (2005)Google Scholar
  5. 5.
    Becker, P.: Working Draft, Standard for Programming Language C++. Technical Report N2914 (June 2009)Google Scholar
  6. 6.
    Becker, P.: The C++ Standard Library Extensions: A Tutorial and Reference, 1st edn. Addison-Wesley Professional, Boston (2006)Google Scholar
  7. 7.
    van Rossum, G.: The Python Language Reference Manual. Network Theory Ltd., Paperback (September 2003)Google Scholar
  8. 8.
    ECMA: The C# Language Specification. Technical Report, ECMA (European Association for Standardizing Information and Communication Systems), Geneva, Switzerland (June 2006)Google Scholar
  9. 9.
    Arnold, K., Gosling, J., Holmes, D.: The Java Programming Language, 4th edn. Prentice Hall PTR, Englewood Cliffs (2005)Google Scholar
  10. 10.
    Miller, A.: (retrieved on July 6, 2009)
  11. 11.
    Austern, M.H.: Generic Programming and the STL: Using and Extending the C++ Standard Template Library. Addison-Wesley Longman Publishing Co., Inc., Boston (1998)Google Scholar
  12. 12.
    An, P., Jula, A., Rus, S., Saunders, S., Smith, T., Tanase, G., Thomas, N., Amato, N., Rauchwerger, L.: STAPL: A Standard Template Adaptive Parallel C++ Library. In: Dietz, H.G. (ed.) LCPC 2001. LNCS, vol. 2624, pp. 193–208. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  13. 13.
    Merrill, J., Vandevoorde, D.: Initializer Lists — Alternative Mechanism and Rationale. Technical Report N2640, JTC1/SC22/WG21 C++ Standards Committee (2008)Google Scholar
  14. 14.
    Gregor, D., Järvi, J., Siek, J., Stroustrup, B., Dos Reis, G., Lumsdaine, A.: Concepts: Linguistic Support for Generic Programming in C++. In: OOPSLA 2006: Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 291–310. ACM Press, New York (2006)CrossRefGoogle Scholar
  15. 15.
    Gregor, D., Stroustrup, B., Siek, J., Widman, J.: Proposed Wording for Concepts (Revision 4). Technical Report N2501, JTC1/SC22/WG21 C++ Standards Committee (February 2008)Google Scholar
  16. 16.
    Pirkelbauer, P., Dechev, D., Stroustrup, B.: Extracting Concepts from C++ Generic Functions. Technical Report, Dept. of Computer Science and Engineering, Texas A&M (October 2009)Google Scholar
  17. 17.
    Abrahams, D., Gurtovoy, A.: C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond. C++ in Depth Series. Addison-Wesley Professional, Reading (2004)Google Scholar
  18. 18.
    Järvi, J., Willcock, J., Hinnant, H., Lumsdaine, A.: Function Overloading Based on Arbitrary Properties of Types. C/C++ Users Journal 21(6), 25–32 (2003)Google Scholar
  19. 19.
    Myers, N.C.: Traits: a New and Useful Template Technique. C++ Report (1995)Google Scholar
  20. 20.
    Mens, T., Tourwé, T.: A Survey of Software Refactoring. IEEE Trans. Softw. Eng. 30(2), 126–139 (2004)CrossRefGoogle Scholar
  21. 21.
    Opdyke, W.F., Johnson, R.E.: Creating Abstract Superclasses by Refactoring. In: CSC 1993: Proceedings of the 1993 ACM Conference on Computer Science, pp. 66–73. ACM, New York (1993)CrossRefGoogle Scholar
  22. 22.
    Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)Google Scholar
  23. 23.
    Kerievsky, J.: Refactoring to Patterns. Pearson Higher Education, London (2004)Google Scholar
  24. 24.
    Lämmel, R.: Towards Generic Refactoring. In: RULE 2002: Proceedings of the 2002 ACM SIGPLAN Workshop on Rule-Based Programming, pp. 15–28. ACM, New York (2002)CrossRefGoogle Scholar
  25. 25.
    Opdyke, W.F.: Refactoring Object-Oriented Frameworks. PhD Thesis, University of Illinois at Urbana-Champaign, Champaign, IL, USA, UMI Order No. GAX93-05645 (1992)Google Scholar
  26. 26.
    Abrahamsson, P., Salo, O., Ronkainen, J.: Agile Software Development Methods: Review and Analysis. Technical Report, VTT Electronics (2002)Google Scholar
  27. 27.
    Brown, W.J., Malveau, R.C., McCormick III, H.W., Mowbray, T.J.: AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis. John Wiley & Sons, Inc, New York (1998)Google Scholar
  28. 28.
    Parnin, C., Görg, C., Nnadi, O.: A Catalogue of Lightweight Visualizations to Support Code Smell Inspection. In: SoftVis 2008: Proceedings of the 4th ACM Symposium on Software Visualization, pp. 77–86. ACM, New York (2008)CrossRefGoogle Scholar
  29. 29.
    Stroustrup, B., Dos Reis, G.: Supporting SELL for High-Performance Computing. In: Ayguadé, E., Baumgartner, G., Ramanujam, J., Sadayappan, P. (eds.) LCPC 2005. LNCS, vol. 4339, pp. 458–465. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  30. 30.
    Eclipse MoDisco Project, (retrieved on September 20, 2009)
  31. 31.
    Baxter, I.D.: DMS: Program Transformations for Practical Scalable Software Evolution. In: IWPSE 2002: Proceedings of the International Workshop on Principles of Software Evolution, pp. 48–51. ACM, New York (2002)CrossRefGoogle Scholar
  32. 32.
    Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.16: Components for Transformation Systems. In: PEPM 2006: Proceedings of the 2006 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 95–99. ACM, New York (2006)CrossRefGoogle Scholar
  33. 33.
    Quinlan, D., Schordan, M., Yi, Q., Supinski, B.R.d.: Semantic-Driven Parallelization of Loops Operating on User-Defined Containers. In: Rauchwerger, L. (ed.) LCPC 2003. LNCS, vol. 2958. Springer, Heidelberg (2004)Google Scholar
  34. 34.
    Balaban, I., Tip, F., Fuhrer, R.: Refactoring Support for Class Library Migration. In: OOPSLA 2005: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 265–279. ACM, New York (2005)CrossRefGoogle Scholar
  35. 35.
    Tansey, W., Tilevich, E.: Annotation Refactoring: Inferring Upgrade Transformations for Legacy Applications. In: OOPSLA 2008: Proceedings of the 23rd ACM SIGPLAN Conference on Object-Oriented Programming Systems Languages and Applications, vol. 43, pp. 295–312. ACM, New York (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Peter Pirkelbauer
    • 1
  • Damian Dechev
    • 1
  • Bjarne Stroustrup
    • 1
  1. 1.Department of Computer Science and EngineeringTexas A&M UniversityCollege Station

Personalised recommendations