Skip to main content

2018 | Supplement | Buchkapitel

A Structure-Driven Process of Automated Refactoring to Design Patterns

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Design patterns can be introduced into an existing code by a code restructuring. It is counted to one of goals of code refactoring. This paper presents a process that automates this kind of refactoring. The approach is based on a structural code analysis aimed at design pattern relevance. The process consists of three main phases: code analysis, determination of a refactoring range, and realization of code restructuring. The latter is a complex code2code transformation, which comprises a series of code refactoring steps. A decision about a range of a design pattern application is taken by a user or can be automated. In both cases, it is supported by a software relevance metric. A framework for the whole process has been implemented as an extension of Eclipse. Code refactoring to exemplary design patterns can be performed in a prototype tool for Java programs.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)MATH Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)MATH
2.
Zurück zum Zitat Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Boston (1999) Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Boston (1999)
3.
Zurück zum Zitat Kierevsky, J.: Refactoring to Patterns. Addison Wesley, Boston (2004)CrossRef Kierevsky, J.: Refactoring to Patterns. Addison Wesley, Boston (2004)CrossRef
4.
Zurück zum Zitat Mariani, T., Vergilio, S.R.: A systematic review on search-based refactoring. Inf. Softw. Technol. 83, 14–34 (2017)CrossRef Mariani, T., Vergilio, S.R.: A systematic review on search-based refactoring. Inf. Softw. Technol. 83, 14–34 (2017)CrossRef
5.
Zurück zum Zitat Amoui, M., Mirarab, S., Ansari, S., Lucas, C.: A genetic algorithm approach to design evolution using design pattern transformation. Int. J. Inf. Technol. Intell. Comput. 1, 235–244 (2006) Amoui, M., Mirarab, S., Ansari, S., Lucas, C.: A genetic algorithm approach to design evolution using design pattern transformation. Int. J. Inf. Technol. Intell. Comput. 1, 235–244 (2006)
6.
Zurück zum Zitat Jensen, A.C., Cheng, B.H.: On the use of genetic programming for automated refactoring and the introduction of design patterns. In: Genetic and Evolutionary Computation Conference (GECCO), pp. 1341–1348. ACM (2010) Jensen, A.C., Cheng, B.H.: On the use of genetic programming for automated refactoring and the introduction of design patterns. In: Genetic and Evolutionary Computation Conference (GECCO), pp. 1341–1348. ACM (2010)
7.
Zurück zum Zitat Shimomura, T., Ikeda, K., Takahashi, M.: An approach to GA-driven automatic refactoring based on design patterns. In: 5th International Conference on Software Engineering Advances (ICSEA), pp. 213–218 (2010) Shimomura, T., Ikeda, K., Takahashi, M.: An approach to GA-driven automatic refactoring based on design patterns. In: 5th International Conference on Software Engineering Advances (ICSEA), pp. 213–218 (2010)
8.
Zurück zum Zitat Kim, J., Batory, D., Dig, D.: Scripting parametric refactorings in Java to retrofit design patterns. In: 31st IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 211–220. IEEE (2015) Kim, J., Batory, D., Dig, D.: Scripting parametric refactorings in Java to retrofit design patterns. In: 31st IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 211–220. IEEE (2015)
9.
Zurück zum Zitat Gaitani, M.A.G., Zafeiris, V.E., Diamantidis, N.A., Giakoumakis, E.A.: Automated refactoring to the null object design pattern. Inf. Softw. Technol. 59, 33–52 (2015)CrossRef Gaitani, M.A.G., Zafeiris, V.E., Diamantidis, N.A., Giakoumakis, E.A.: Automated refactoring to the null object design pattern. Inf. Softw. Technol. 59, 33–52 (2015)CrossRef
10.
Zurück zum Zitat Jeon, S.-U., Lee, J.-S. Bae, D.-H: An automated refactoring approach to design pattern-based program transformations in Java programs. In: Proceedings of Ninth Asia-Pacific Software Engineering Conference (APSEC 2002), pp. 337–345. IEEE Computer Society (2002) Jeon, S.-U., Lee, J.-S. Bae, D.-H: An automated refactoring approach to design pattern-based program transformations in Java programs. In: Proceedings of Ninth Asia-Pacific Software Engineering Conference (APSEC 2002), pp. 337–345. IEEE Computer Society (2002)
11.
Zurück zum Zitat Christopoulou, A., Giakoumakis, E., Zafeiris, V.E., Soukara, V.: Automated refactoring to the strategy design pattern. Inf. Softw. Technol. 54, 1202–1214 (2012)CrossRef Christopoulou, A., Giakoumakis, E., Zafeiris, V.E., Soukara, V.: Automated refactoring to the strategy design pattern. Inf. Softw. Technol. 54, 1202–1214 (2012)CrossRef
12.
Zurück zum Zitat Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20, 476–493 (1994)CrossRef Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20, 476–493 (1994)CrossRef
13.
Zurück zum Zitat Kan, S.H.: Metrics and Models in Software Quality Engineering. Addison-Wesley, Boston (1998)MATH Kan, S.H.: Metrics and Models in Software Quality Engineering. Addison-Wesley, Boston (1998)MATH
14.
Zurück zum Zitat Bansiya, J., Davis, C.G.: A hierarchical model for object-oriented design quality assessment. IEEE Trans. Softw. Eng. 28(1), 4–17 (2002)CrossRef Bansiya, J., Davis, C.G.: A hierarchical model for object-oriented design quality assessment. IEEE Trans. Softw. Eng. 28(1), 4–17 (2002)CrossRef
15.
Zurück zum Zitat Tsantalis, N., Chatzigeorgiou, A.: Identification of move method refactoring opportunities. IEEE Trans. Softw. Eng. 35(3), 347–367 (2009)CrossRef Tsantalis, N., Chatzigeorgiou, A.: Identification of move method refactoring opportunities. IEEE Trans. Softw. Eng. 35(3), 347–367 (2009)CrossRef
16.
Zurück zum Zitat Silva, D., Terra, R., Valente, M.T.: Recommending automated extract method refactorings. In: 22nd International Conference on Program Comprehension (ICPC), pp. 146–156. ACM, New York (2014) Silva, D., Terra, R., Valente, M.T.: Recommending automated extract method refactorings. In: 22nd International Conference on Program Comprehension (ICPC), pp. 146–156. ACM, New York (2014)
17.
Zurück zum Zitat Bavota, G., Lucia, A.D., Marcus, A., Oliveto, R.: Recommending refactoring operations in large software systems. In: Robillard, M.P., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering (RSSE), pp. 387–419. Springer, Berlin (2014)CrossRef Bavota, G., Lucia, A.D., Marcus, A., Oliveto, R.: Recommending refactoring operations in large software systems. In: Robillard, M.P., Maalej, W., Walker, R.J., Zimmermann, T. (eds.) Recommendation Systems in Software Engineering (RSSE), pp. 387–419. Springer, Berlin (2014)CrossRef
18.
Zurück zum Zitat Vakilian, M., Chen, N., Negara, S., Rajkumar, B.A., Bailey, B.P., Johnson, R.E.: Use, disuse, and misuse of automated refactorings. In: 34th International Conference on Software Engineering (ICSE), pp. 233–243 (2012) Vakilian, M., Chen, N., Negara, S., Rajkumar, B.A., Bailey, B.P., Johnson, R.E.: Use, disuse, and misuse of automated refactorings. In: 34th International Conference on Software Engineering (ICSE), pp. 233–243 (2012)
19.
Zurück zum Zitat Tokuda, L., Batory, D.S.: Evolving object-oriented designs with refactorings. Autom. Softw. Eng. 8(1), 89–120 (2001)CrossRefMATH Tokuda, L., Batory, D.S.: Evolving object-oriented designs with refactorings. Autom. Softw. Eng. 8(1), 89–120 (2001)CrossRefMATH
20.
Zurück zum Zitat Sommerville, I.: Software Engineering, 10th edn. Pearson Education, New York (2015)MATH Sommerville, I.: Software Engineering, 10th edn. Pearson Education, New York (2015)MATH
22.
Zurück zum Zitat Cinneide, M.O.: Automated application of design patterns: a refactoring approach. Ph.D. thesis, University of Dublin, Trinity College (2001) Cinneide, M.O.: Automated application of design patterns: a refactoring approach. Ph.D. thesis, University of Dublin, Trinity College (2001)
23.
Zurück zum Zitat Mayvan, B.B., Rasoolzadegan, A., Yazdi, Z.G.: The state of the art on design patterns: a systematic mapping of the literature. J. Syst. Softw. 125, 93–118 (2017)CrossRef Mayvan, B.B., Rasoolzadegan, A., Yazdi, Z.G.: The state of the art on design patterns: a systematic mapping of the literature. J. Syst. Softw. 125, 93–118 (2017)CrossRef
24.
Zurück zum Zitat Abbe, M., Yoo, C.-J.: Trends, opportunities and challenges of software refactoring: a systematic literature review. Int. J. Softw. Eng. Appl. 8(6), 299–318 (2014) Abbe, M., Yoo, C.-J.: Trends, opportunities and challenges of software refactoring: a systematic literature review. Int. J. Softw. Eng. Appl. 8(6), 299–318 (2014)
25.
Zurück zum Zitat Derezinska, A.: Metrics in software development and evolution with design patterns (to appear) Derezinska, A.: Metrics in software development and evolution with design patterns (to appear)
Metadaten
Titel
A Structure-Driven Process of Automated Refactoring to Design Patterns
verfasst von
Anna Derezińska
Copyright-Jahr
2018
DOI
https://doi.org/10.1007/978-3-319-67229-8_4

Premium Partner