Advertisement

Reducing the Class Coupling of Legacy Code by a Metrics-Based Relocation of Class Members

  • Marvin Ferber
  • Sascha Hunold
  • Björn Krellner
  • Thomas Rauber
  • Thomas Reichel
  • Gudula Rünger
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7054)

Abstract

With the rapid growth of the complexity of software systems, the problem of integrating and maintaining legacy software is more relevant than ever. To overcome this problem, many methods for refactoring legacy code have already been proposed such as renaming classes or extracting interfaces. To perform a real modularization, methods have to be moved between classes. However, moving a single method is often not possible due to code dependencies.

In this article we present an approach to modularize legacy software by moving multiple related class members. It is shown how to identify groups of class members with similar concerns. We present two different code patterns that the related members and their dependent classes must match to allow a relocation of the related members. We also demonstrate how our pattern-based approach for automated modularization of legacy software can be applied to two open source projects.

Keywords

legacy software class decoupling pattern-based code refactoring code metrics 

References

  1. 1.
    Eick, S.G., Graves, T.L., Karr, A.F., Marron, J.S., Mockus, A.: Does Code Decay? Assessing the Evidence from Change Management Data. IEEE Transactions on Software Engineering 27(1), 1–12 (2001)CrossRefGoogle Scholar
  2. 2.
    Binkley, D.: Source Code Analysis: A Road Map. In: Future of Software Engineering (FOSE), pp. 104–119. IEEE Comp. Soc., Washington, DC (2007)CrossRefGoogle Scholar
  3. 3.
    Mens, T., Tourwé, T.: A Survey of Software Refactoring. IEEE Transactions on Software Engineering 30(2), 126–139 (2004)CrossRefGoogle Scholar
  4. 4.
    Serrano, M.A., Carver, D.L., de Oca, C.M.: Reengineering Legacy Systems for Distributed Environments. Journal of Systems and Software 64(1), 37–55 (2002)CrossRefGoogle Scholar
  5. 5.
    Seng, O., Stammel, J., Burkhart, D.: Search-Based Determination of Refactorings for Improving the Class Structure of Object-Oriented Systems. In: Proc. of the 8th Annual Conf. on Genetic and Evolutionary Computation (GECCO), pp. 1909–1916. ACM, New York (2006)Google Scholar
  6. 6.
    Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Massachusetts (1999)Google Scholar
  7. 7.
    Hunold, S., Korch, M., Krellner, B., Rauber, T., Reichel, T., Rünger, G.: Transformation of Legacy Software into Client/Server Applications through Pattern-Based Rearchitecturing. In: Proc. of the 32nd IEEE International Computer Software and Applications Conf (COMPSAC), pp. 303–310 (2008)Google Scholar
  8. 8.
    Hunold, S., Krellner, B., Rauber, T., Reichel, T., Rünger, G.: Pattern-based Refactoring of Legacy Software Systems. In: Proc. of the 11th International Conference on Enterprise Information Systems (ICEIS), pp. 78–89 (2009)Google Scholar
  9. 9.
    Lanza, M., Marinescu, R., Ducasse, S.: Object-Oriented Metrics in Practice. Springer-Verlag New York, Inc., Secaucus (2006)zbMATHGoogle Scholar
  10. 10.
    Brito e Abreu, F., Carapuça, R.: Object-Oriented Software Engineering: Measuring and Controlling the Development Process. In: Proc. of the 4th International Conference on Software Quality (ASQC), McLean, VA, USA (1994)Google Scholar
  11. 11.
    Moser, R., Abrahamsson, P., Pedrycz, W., Sillitti, A., Succi, G.: A Case Study on the Impact of Refactoring on Quality and Productivity in an Agile Team. In: Meyer, B., Nawrocki, J.R., Walter, B. (eds.) CEE-SET 2007. LNCS, vol. 5082, pp. 252–266. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    O’Keeffe, M., í Cinnéide, M.: Search-based Refactoring for Software Maintenance. Journal of Systems and Software 81(4), 502–516 (2008)CrossRefGoogle Scholar
  13. 13.
    Tahvildari, L., Kontogiannis, K.: Improving Design Quality Using Meta-pattern Transformations: a Metric-based Approach. Journal of Software Maintenance 16(4-5), 331–361 (2004)CrossRefGoogle Scholar
  14. 14.
    Brown, W.J., Malveau, R.C., McCormick III, H.W., Mowbray, T.J.: Anti-Patterns: Refactoring Software, Architectures, and Projects in Crisis, 1st edn. John Wiley & Sons, Inc. (1998)Google Scholar
  15. 15.
    Rayside, D.: Points-To Analysis. Technical report, MIT Computer Science and Artificial Intelligence Laboratory, Cambridge, MA, USA (2005)Google Scholar
  16. 16.
    Ryder, B.G.: Dimensions of Precision in Reference Analysis of Object-Oriented Programming Languages. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 126–137. Springer, Heidelberg (2003)CrossRefGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2012

Authors and Affiliations

  • Marvin Ferber
    • 1
  • Sascha Hunold
    • 1
  • Björn Krellner
    • 2
  • Thomas Rauber
    • 1
  • Thomas Reichel
    • 2
  • Gudula Rünger
    • 2
  1. 1.University of BayreuthGermany
  2. 2.Chemnitz University of TechnologyGermany

Personalised recommendations