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.
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- Martin Fowler. 1999. Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston, MA, USA.Google ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarCross Ref
- Joseph M. Hilbe. 2014. Modeling Count Data. Cambridge University Press. Google ScholarCross Ref
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- G. Soares, R. Gheyi, D. Serey, and T. Massoni. 2010. Making Program Refactoring Safer. IEEE Software 27, 4 (July 2010), 52--57. Google ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- An exploratory study on extract method floss-refactoring
Recommendations
Case study on software refactoring tactics
Refactorings might be done using two different tactics: root canal refactoring and floss refactoring. Root canal refactoring is to set aside an extended period specially for refactoring. Floss refactoring is to interleave refactorings with other ...
The buggy side of code refactoring: understanding the relationship between refactorings and bugs
ICSE '18: Proceedings of the 40th International Conference on Software Engineering: Companion ProceeedingsCode refactoring is widely practiced by software developers. There is an explicit assumption that code refactoring improves the structural quality of a software project, thereby also reducing its bug proneness. However, refactoring is often applied with ...
Recommending automated extract method refactorings
ICPC 2014: Proceedings of the 22nd International Conference on Program ComprehensionExtract Method is a key refactoring for improving program comprehension. However, recent empirical research shows that refactoring tools designed to automate Extract Methods are often underused. To tackle this issue, we propose a novel approach to ...
Comments