Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3341105.3373893acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

An exploratory study on extract method floss-refactoring

Published: 30 March 2020 Publication 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.
[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.
[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.
[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.
[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.
[6]
Martin Fowler. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA.
[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.
[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.
[9]
Joseph M. Hilbe. 2014. Modeling Count Data. Cambridge University Press.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[22]
G. Soares, R. Gheyi, D. Serey, and T. Massoni. 2010. Making Program Refactoring Safer. IEEE Software 27, 4 (July 2010), 52--57.
[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.

Cited By

View all
  • (2023)The Untold Story of Code Refactoring Customizations in PracticeProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00021(108-120)Online publication date: 14-May-2023
  • (2022)Evaluating the Effectiveness of Regression Test Suites for Extract Method ValidationProceedings of the 7th Brazilian Symposium on Systematic and Automated Software Testing10.1145/3559744.3559745(1-8)Online publication date: 3-Oct-2022
  • (2021)Accumulated precipitation and air density are linked to termite (Blattodea) flight synchronism in a Seasonally Dry Tropical Forest in north‐eastern BrazilAustral Entomology10.1111/aen.1257761:1(78-85)Online publication date: Dec-2021

Recommendations

Comments

Information & Contributors

Information

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
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 30 March 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. empirical study
  2. extract method
  3. floss refactoring
  4. refactoring

Qualifiers

  • Research-article

Funding Sources

  • National Council for Scientific and Technological Development (CNPq)/Brazil

Conference

SAC '20
Sponsor:
SAC '20: The 35th ACM/SIGAPP Symposium on Applied Computing
March 30 - April 3, 2020
Brno, Czech Republic

Acceptance Rates

Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)20
  • Downloads (Last 6 weeks)1
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2023)The Untold Story of Code Refactoring Customizations in PracticeProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00021(108-120)Online publication date: 14-May-2023
  • (2022)Evaluating the Effectiveness of Regression Test Suites for Extract Method ValidationProceedings of the 7th Brazilian Symposium on Systematic and Automated Software Testing10.1145/3559744.3559745(1-8)Online publication date: 3-Oct-2022
  • (2021)Accumulated precipitation and air density are linked to termite (Blattodea) flight synchronism in a Seasonally Dry Tropical Forest in north‐eastern BrazilAustral Entomology10.1111/aen.1257761:1(78-85)Online publication date: Dec-2021

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media