skip to main content
10.1145/3341105.3373893acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

An exploratory study on extract method floss-refactoring

Authors Info & Claims
Published:30 March 2020Publication History

ABSTRACT

As a software evolves its code requires constant updating. In this sense, refactoring edits aim at improving structural aspects of a code without changing its external behavior. However, studies show that developers tend to combine in a single commit refactorings and behavior-changing edits (extra edits) - floss-refactoring. Floss-refactorings can be error-prone and require careful handling. However, little has been done to understand how refactorings and extra edits relate in practice. In this work, we propose a strategy for extracting floss-refactoring data. Moreover, we mine code repositories of 16 open-source projects and analyse commits with floss refactoring related to Extract Method. Our results show that developers often combine Extract Method with inner method extra edits (e.g., statement insert), with an expected increase of 8-16% of extra edits by each Extract Method. Moreover, some statements are more likely to be changed depending on the extra edit performed.

References

  1. E. L. G. Alves, M. Song, T. Massoni, P. D. L. Machado, and M. Kim. 2018. Refactoring Inspection Support for Manual Refactoring Edits. IEEE Transactions on Software Engineering 44, 4 (April 2018), 365--383. Google ScholarGoogle ScholarCross RefCross Ref
  2. Gabriele Bavota, Bernardino De Carluccio, Andrea De Lucia, Massimiliano Di Penta, Rocco Oliveto, and Orazio Strollo. 2012. When Does a Refactoring Induce Bugs? An Empirical Study. In Proceedings of the 2012 IEEE 12th International Working Conference on Source Code Analysis and Manipulation (SCAM '12). IEEE Computer Society, Washington, DC, USA, 104--113. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. FlÃαvia Coelho, Tiago Massoni, and Everton Alves. 2019. Refactoring-Aware Code Review: A Systematic Mapping Study. In Proceedings of 3rd International Workshop on Refactoring.Google ScholarGoogle Scholar
  4. Jean-Rémy Falleri, Floréal Morandat, Xavier Blanc, Matias Martinez, and Martin Monperrus. 2014. Fine-grained and Accurate Source Code Differencing. In Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (ASE '14). ACM, New York, NY, USA, 313--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. Fluri, M. Wuersch, M. PInzger, and H. Gall. 2007. Change Distilling:Tree Differencing for Fine-Grained Source Code Change Extraction. IEEE Transactions on Software Engineering 33, 11 (Nov 2007), 725--743. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Martin Fowler. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. X. Ge, Q. L. DuBose, and E. Murphy-Hill. 2012. Reconciling manual and automatic refactoring. In 2012 34th International Conference on Software Engineering (ICSE). 211--221. Google ScholarGoogle ScholarCross RefCross Ref
  8. X. Ge, S. Sarkar, J. Witschey, and E. Murphy-Hill. 2017. Refactoring-aware code review. In 2017 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). 71--79. Google ScholarGoogle ScholarCross RefCross Ref
  9. Joseph M. Hilbe. 2014. Modeling Count Data. Cambridge University Press. Google ScholarGoogle ScholarCross RefCross Ref
  10. M. Kaya, S. Conley, Z. S. Othman, and A. Varol. 2018. Effective software refactoring process. In 2018 6th International Symposium on Digital Forensic and Security (ISDFS). 1--6. Google ScholarGoogle ScholarCross RefCross Ref
  11. Miryung Kim, Dongxiang Cai, and Sunghun Kim. 2011. An Empirical Investigation into the Role of API-level Refactorings During Software Evolution. In Proceedings of the 33rd International Conference on Software Engineering (ICSE '11). ACM, New York, NY, USA, 151--160. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Miryung Kim, Thomas Zimmermann, and Nachiappan Nagappan. 2012. A Field Study of Refactoring Challenges and Benefits. In Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering (FSE '12). ACM, New York, NY, USA, Article 50, 11 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Nikolaos Mittas, Makrina Viola Kosti, Vasiliki Argyropoulou, and Lefteris Angelis. 2010. Modeling the Relationship Between Software Effort and Size Using Deming Regression. In Proc. of the 6th International Conference on Predictive Models in Software Engineering (PROMISE '10). ACM, New York, NY, USA, Article 7, 10 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Emerson Murphy-Hill, Chris Parnin, and Andrew P. Black. 2009. How We Refactor, and How We Know It. In Proceedings of the 31st International Conference on Software Engineering (ICSE '09). IEEE Computer Society, Washington, DC, USA, 287--297. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Stas Negara, Nicholas Chen, Mohsen Vakilian, Ralph E. Johnson, and Danny Dig. 2013. A Comparative Study of Manual and Automated Refactorings. In Proceedings of the 27th European Conference on Object-Oriented Programming (ECOOP'13). Springer-Verlag, Berlin, Heidelberg, 552--576. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Fabio Palomba, Andy Zaidman, Rocco Oliveto, and Andrea De Lucia. 2017. An Exploratory Study on the Relationship Between Changes and Refactoring. In Proceedings of the 25th International Conference on Program Comprehension (ICPC '17). IEEE Press, Piscataway, NJ, USA, 176--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Peter Peduzzi, John Concato, Elizabeth Kemper, Theodore R Holford, and Alvan R Feinstein. 1996. A simulation study of the number of events per variable in logistic regression analysis. Journal of clinical epidemiology 49, 12 (1996), 1373--1379.Google ScholarGoogle ScholarCross RefCross Ref
  18. K. Prete, N. Rachatasumrit, N. Sudan, and M. Kim. 2010. Template-based reconstruction of complex refactorings. In 2010 IEEE International Conference on Software Maintenance. 1--10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Danilo Silva, Nikolaos Tsantalis, and Marco Tulio Valente. 2016. Why We Refactor? Confessions of GitHub Contributors. In Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2016). ACM, New York, NY, USA, 858--870. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Danilo Silva and Marco Tulio Valente. 2017. RefDiff: Detecting Refactorings in Version Histories. In Proc. of the 14th International Conference on Mining Software Repositories (MSR '17). IEEE Press, Piscataway, NJ, USA, 269--279. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. Soares, B. Catao, C. Varjao, S. Aguiar, R. Gheyi, and T. Massoni. 2011. Analyzing Refactorings on Software Repositories. In 2011 25th Brazilian Symposium on Software Engineering. 164--173. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. G. Soares, R. Gheyi, D. Serey, and T. Massoni. 2010. Making Program Refactoring Safer. IEEE Software 27, 4 (July 2010), 52--57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Nikolaos Tsantalis, Matin Mansouri, Laleh M. Eshkevari, Davood Mazinanian, and Danny Dig. 2018. Accurate and Efficient Refactoring Detection in Commit History. In Proc. of the 40th Int. Conference on Software Engineering (ICSE '18). ACM, New York, NY, USA, 483--494. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An exploratory study on extract method floss-refactoring

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          SAC '20: Proceedings of the 35th Annual ACM Symposium on Applied Computing
          March 2020
          2348 pages
          ISBN:9781450368667
          DOI:10.1145/3341105

          Copyright © 2020 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 30 March 2020

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate1,650of6,669submissions,25%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader