Skip to main content

2020 | OriginalPaper | Buchkapitel

How Do Developers Refactor Code to Improve Code Reusability?

verfasst von : Eman Abdullah AlOmar, Philip T. Rodriguez, Jordan Bowman, Tianjia Wang, Benjamin Adepoju, Kevin Lopez, Christian Newman, Ali Ouni, Mohamed Wiem Mkaouer

Erschienen in: Reuse in Emerging Software Engineering Practices

Verlag: Springer International Publishing

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

search-config
loading …

Abstract

Refactoring is the de-facto practice to optimize software health. While there has been several studies proposing refactoring strategies to optimize software design through applying design patterns and removing design defects, little is known about how developers actually refactor their code to improve its reuse. Therefore, we extract, from 1,828 open source projects, a set of refactorings which were intended to improve the software reusability. We analyze the impact of reusability refactorings on state-of-the-art reusability metrics, and we compare the distribution of reusability refactoring types, with the distribution of the remaining mainstream refactorings. Overall, we found that the distribution of refactoring types, applied in the context of reusability, is different from the distribution of refactoring types in mainstream development. In the refactorings performed to improve reusability, source files are subject to more design level types of refactorings. Reusability refactorings significantly impact, high-level code elements, such as packages, classes, and methods, while typical refactorings, impact all code elements, including identifiers, and parameters.

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 AlOmar, E., Mkaouer, M.W., Ouni, A.: Can refactoring be self-affirmed? An exploratory study on how developers document their refactoring activities in commit messages. In: 2019 IEEE/ACM 3rd International Workshop on Refactoring (IWoR), pp. 51–58. IEEE (2019) AlOmar, E., Mkaouer, M.W., Ouni, A.: Can refactoring be self-affirmed? An exploratory study on how developers document their refactoring activities in commit messages. In: 2019 IEEE/ACM 3rd International Workshop on Refactoring (IWoR), pp. 51–58. IEEE (2019)
2.
Zurück zum Zitat AlOmar, E.A., Mkaouer, M.W., Ouni, A.: Toward the automatic classification of self-affirmed refactoring. J. Syst. Softw. 171, 110821 (2020)CrossRef AlOmar, E.A., Mkaouer, M.W., Ouni, A.: Toward the automatic classification of self-affirmed refactoring. J. Syst. Softw. 171, 110821 (2020)CrossRef
3.
Zurück zum Zitat AlOmar, E.A., Mkaouer, M.W., Ouni, A., Kessentini, M.: On the impact of refactoring on the relationship between quality attributes and design metrics. In: 2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pp. 1–11. IEEE (2019) AlOmar, E.A., Mkaouer, M.W., Ouni, A., Kessentini, M.: On the impact of refactoring on the relationship between quality attributes and design metrics. In: 2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), pp. 1–11. IEEE (2019)
4.
Zurück zum Zitat Alshayeb, M.: Empirical investigation of refactoring effect on software quality. Inf. Softw. Technol. 51(9), 1319–1326 (2009)CrossRef Alshayeb, M.: Empirical investigation of refactoring effect on software quality. Inf. Softw. Technol. 51(9), 1319–1326 (2009)CrossRef
5.
Zurück zum Zitat Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)CrossRef Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)CrossRef
6.
Zurück zum Zitat Fakhoury, S., Roy, D., Hassan, A., Arnaoudova, V.: Improving source code readability: theory and practice. In: 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC), pp. 2–12. IEEE (2019) Fakhoury, S., Roy, D., Hassan, A., Arnaoudova, V.: Improving source code readability: theory and practice. In: 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC), pp. 2–12. IEEE (2019)
7.
Zurück zum Zitat Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (2018)MATH Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, Boston (2018)MATH
8.
Zurück zum Zitat Lorenz, M., Kidd, J.: Object-Oriented Software Metrics, vol. 131. Prentice Hall, Englewood Cliffs (1994) Lorenz, M., Kidd, J.: Object-Oriented Software Metrics, vol. 131. Prentice Hall, Englewood Cliffs (1994)
12.
Zurück zum Zitat Murphy-Hill, E., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Trans. Softw. Eng. 38(1), 5–18 (2012)CrossRef Murphy-Hill, E., Parnin, C., Black, A.P.: How we refactor, and how we know it. IEEE Trans. Softw. Eng. 38(1), 5–18 (2012)CrossRef
13.
Zurück zum Zitat Opdyke, W.F.: Refactoring object-oriented frameworks (1992) Opdyke, W.F.: Refactoring object-oriented frameworks (1992)
14.
Zurück zum Zitat Pantiuchina, J., Lanza, M., Bavota, G.: Improving code: the (mis) perception of quality metrics. In: 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 80–91. IEEE (2018) Pantiuchina, J., Lanza, M., Bavota, G.: Improving code: the (mis) perception of quality metrics. In: 2018 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 80–91. IEEE (2018)
15.
Zurück zum Zitat Peruma, A., Mkaouer, M.W., Decker, M.J., Newman, C.D.: Contextualizing rename decisions using refactorings, commit messages, and data types. J. Syst. Softw. 169, 110704 (2020)CrossRef Peruma, A., Mkaouer, M.W., Decker, M.J., Newman, C.D.: Contextualizing rename decisions using refactorings, commit messages, and data types. J. Syst. Softw. 169, 110704 (2020)CrossRef
16.
Zurück zum Zitat Peruma, A., Newman, C.D., Mkaouer, M.W., Ouni, A., Palomba, F.: An exploratory study on the refactoring of unit test files in android applications. In: Conference on Software Engineering Workshops, ICSEW 2020 (2020) Peruma, A., Newman, C.D., Mkaouer, M.W., Ouni, A., Palomba, F.: An exploratory study on the refactoring of unit test files in android applications. In: Conference on Software Engineering Workshops, ICSEW 2020 (2020)
17.
Zurück zum Zitat Sharma, A., Kumar, R., Grover, P.: A critical survey of reusability aspects for component-based systems. World Acad. Sci. Eng. Technol. 19, 411–415 (2007) Sharma, A., Kumar, R., Grover, P.: A critical survey of reusability aspects for component-based systems. World Acad. Sci. Eng. Technol. 19, 411–415 (2007)
18.
Zurück zum Zitat Stroggylos, K., Spinellis, D.: Refactoring-does it improve software quality? In: Fifth International Workshop on Software Quality (WoSQ 2007: ICSE Workshops 2007), p. 10. IEEE (2007) Stroggylos, K., Spinellis, D.: Refactoring-does it improve software quality? In: Fifth International Workshop on Software Quality (WoSQ 2007: ICSE Workshops 2007), p. 10. IEEE (2007)
19.
Zurück zum Zitat Tsantalis, N., Mansouri, M., Eshkevari, L.M., Mazinanian, D., Dig, D.: Accurate and efficient refactoring detection in commit history. In: Proceedings of the 40th International Conference on Software Engineering, pp. 483–494. ACM (2018) Tsantalis, N., Mansouri, M., Eshkevari, L.M., Mazinanian, D., Dig, D.: Accurate and efficient refactoring detection in commit history. In: Proceedings of the 40th International Conference on Software Engineering, pp. 483–494. ACM (2018)
20.
Zurück zum Zitat Wilcoxon, F.: Individual comparisons by ranking methods. Biom. Bull. 1(6), 80–83 (1945)CrossRef Wilcoxon, F.: Individual comparisons by ranking methods. Biom. Bull. 1(6), 80–83 (1945)CrossRef
Metadaten
Titel
How Do Developers Refactor Code to Improve Code Reusability?
verfasst von
Eman Abdullah AlOmar
Philip T. Rodriguez
Jordan Bowman
Tianjia Wang
Benjamin Adepoju
Kevin Lopez
Christian Newman
Ali Ouni
Mohamed Wiem Mkaouer
Copyright-Jahr
2020
DOI
https://doi.org/10.1007/978-3-030-64694-3_16

Premium Partner