skip to main content
10.1145/3613372.3613416acmotherconferencesArticle/Chapter ViewAbstractPublication PagessbesConference Proceedingsconference-collections
research-article

RMT: A Semi-Automated Tool for Refactoring Design Patterns

Published: 25 September 2023 Publication History

Abstract

When done manually, software refactoring becomes a thorough job and can introduce chances of human failure during its application. Automated or semi-automated tools for this purpose can facilitate the refactoring process. This paper presents the semi-automated Refactoring and Measurement Tool (RMT) that performs pattern-based refactoring in source code written in Java. RMT detects and applies design patterns using literature methods and evaluates the benefits of pattern application regarding quality attributes using software metrics. Five tests were performed with Java projects, introducing candidate classes for refactoring the Strategy and Template Method patterns. Link for video: youtu.be/tDWTmFJCfg8.

References

[1]
Maurício Aniche. 2016. CK: a software quality metric calculation tool. www.github.com/mauricioaniche/ck.
[2]
Luan Bukowitz Beluzzo. 2018. Abordagem para avaliar e detectar pontos de inserção e aplicação de padrões de projeto em código-fonte. Master’s thesis. Universidade Tecnológica Federal do Paraná.
[3]
Aikaterini Christopoulou, E.A. Giakoumakis, Vassilis E. Zafeiris, and Vasiliki Soukara. 2012. Automated refactoring to the Strategy design pattern. Information and Software Technology 54, 11 (2012), 1202–1214. https://doi.org/10.1016/j.infsof.2012.05.004
[4]
Mel O Cinneide. 2000. Automated refactoring to introduce design patterns. In Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium. IEEE, 722–724.
[5]
Oracle Corporation. 2023. Java API for RESTful Web Services. www.docs.oracle.com/javaee/7/api/javax/ws/rs/package-summary.html.
[6]
Oracle Corporation. 2023. Java Platform, Standard Edition (Java SE). oracle.com/java.
[7]
Oracle Corporation. 2023. JavaFX. www.oracle.com/technetwork/pt/java/javafx/overview/index.html.
[8]
Martin Fowler et al.1999. Refactoring: improving the design of existing code.Addison-Wesley Professional.
[9]
Apache Software Foundation. [n. d.]. Apache Maven. www.maven.apache.org/.
[10]
Eclipse Foundation. 2023. Eclipse IDE. www.eclipse.org/ide/.
[11]
Maria Anna G. Gaitani, Vassilis E. Zafeiris, N.A. Diamantidis, and E.A. Giakoumakis. 2015. Automated refactoring to the Null Object design pattern. Information and Software Technology 59 (2015), 33–52. https://doi.org/10.1016/j.infsof.2014.10.010
[12]
Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, and Design Patterns. 2009. Elements of reusable object-oriented software. Addison-Wesley Reading, Massachusetts.
[13]
Xi Ge, Quinton L. DuBose, and Emerson R. Murphy-Hill. 2012. Reconciling manual and automatic refactoring. 2012 34th International Conference on Software Engineering (ICSE) (2012), 211–221.
[14]
Yossi Gil and Matteo Orrù. 2017. The Spartanizer: Massive Automatic Refactoring. https://doi.org/10.1109/SANER.2017.7884657
[15]
GitHub. 2008. GitHub. www.github.com/.
[16]
Red Hat. 2023. Wildfly. www.wildfly.org/.
[17]
Sang-Uk Jeon, Joon-Sang Lee, and Doo-Hwan Bae. 2002. An automated refactoring approach to design pattern-based program transformations in Java programs. In Ninth Asia-Pacific Software Engineering Conference, 2002.337–345. https://doi.org/10.1109/APSEC.2002.1183003
[18]
Nicolas Juillerat and Béat Hirsbrunner. 2007. Toward an Implementation of the Form Template Method Refactoring. 81 – 90. https://doi.org/10.1109/SCAM.2007.11
[19]
Joshua Kerievsky. 2008. Refactoring to Patterns.Addison-Wesley Pearson Education.
[20]
Wei Liu, Zhi gang Hu, Hong tao Liu, and Liu Yang. 2014. Automated pattern-directed refactoring for complex conditional statements. Journal of Central South University 21, 5 (2014), 1935–1945.
[21]
Philip Mayer and Andreas Schroeder. 2013. Towards Automated Cross-Language Refactorings between Java and DSLs Used by Java Frameworks. In Proceedings of the 2013 ACM Workshop on Workshop on Refactoring Tools (Indianapolis, Indiana, USA) (WRT ’13). Association for Computing Machinery, New York, NY, USA, 5–8. https://doi.org/10.1145/2541348.2541350
[22]
Philip Mayer and Andreas Schroeder. 2014. Automated Multi-Language Artifact Binding and Rename Refactoring between Java and DSLs Used by Java Frameworks. In ECOOP 2014 – Object-Oriented Programming, Richard Jones (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 437–462.
[23]
Philip Mayer and Andreas Schroeder. 2014. Automated Multi-Language Artifact Binding and Rename Refactoring between Java and DSLs Used by Java Frameworks. In Proceedings of the 28th European Conference on ECOOP 2014 — Object-Oriented Programming - Volume 8586. Springer-Verlag, Berlin, Heidelberg, 437–462. https://doi.org/10.1007/978-3-662-44202-9_18
[24]
Inc. MongoDB. 2009. MongoDB. www.mongodb.com/.
[25]
Cleiton Silva Tavares, Fischer Ferreira, and Eduardo Figueiredo. 2018. A Systematic Mapping of Literature on Software Refactoring Tools. In Proceedings of the XIV Brazilian Symposium on Information Systems (Caxias do Sul, Brazil) (SBSI’18). Association for Computing Machinery, New York, NY, USA, Article 11, 8 pages. https://doi.org/10.1145/3229345.3229357
[26]
Vincere Tenebras, Departement Informatica, Wuyts Roel, Brian Herbert, Kevin Anderson, Prelude Dune, and House Harkonnen. 2002. A Logic Meta-Programming Approach to Support the Co-Evolution of Object-Oriented Design and Implementation. (02 2002).
[27]
Zoltán Ujhelyi, Gábor Szőke, Ákos Horváth, Norbert István Csiszár, László Vidács, Dániel Varró, and Rudolf Ferenc. 2015. Performance comparison of query-based techniques for anti-pattern detection. Information and Software Technology 65 (2015), 147–165. https://doi.org/10.1016/j.infsof.2015.01.003
[28]
Jifeng Xuan, Benoit Cornu, Matias Martinez, Benoit Baudry, Lionel Seinturier, and Martin Monperrus. 2016. B-Refactoring: Automatic Test Code Refactoring to Improve Dynamic Analysis. Information and Software Technology 76 (2016), 65–80. https://hal.archives-ouvertes.fr/hal-01309004
[29]
Vassilis Zafeiris, Sotiris H. Poulias, N. A. Diamantidis, and Emmanouel A. Giakoumakis. 2017. Automated refactoring of super-class method invocations to the Template Method design pattern. Information and Software Technology 82 (2017), 19–35.
[30]
Marcelo Serrano Zanetti, Claudio Juan Tessone, Ingo Scholtes, and Frank Schweitzer. 2014. Automated Software Remodularization Based on Move Refactoring: A Complex Systems Approach(MODULARITY ’14). Association for Computing Machinery, New York, NY, USA, 73–84. https://doi.org/10.1145/2577080.2577097

Cited By

View all
  • (2024)Автоматизація рефакторингу коду із використанням бази знань і логічних правилScientific Bulletin of UNFU10.36930/4034021134:2(87-93)Online publication date: 4-Mar-2024

Index Terms

  1. RMT: A Semi-Automated Tool for Refactoring Design Patterns

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    SBES '23: Proceedings of the XXXVII Brazilian Symposium on Software Engineering
    September 2023
    570 pages
    ISBN:9798400707872
    DOI:10.1145/3613372
    Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 25 September 2023

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Automated Tool
    2. Design Patterns
    3. Quality Metrics
    4. Software Refactoring

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    SBES 2023
    SBES 2023: XXXVII Brazilian Symposium on Software Engineering
    September 25 - 29, 2023
    Campo Grande, Brazil

    Acceptance Rates

    Overall Acceptance Rate 147 of 427 submissions, 34%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)29
    • Downloads (Last 6 weeks)6
    Reflects downloads up to 05 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Автоматизація рефакторингу коду із використанням бази знань і логічних правилScientific Bulletin of UNFU10.36930/4034021134:2(87-93)Online publication date: 4-Mar-2024

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format.

    HTML Format

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media