Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3524610.3528386acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
short-paper

Impact of change granularity in refactoring detection

Published: 20 October 2022 Publication History

Abstract

Detecting refactorings in commit history is essential to improve the comprehension of code changes in code reviews and to provide valuable information for empirical studies on software evolution. Several techniques have been proposed to detect refactorings accurately at the granularity level of a single commit. However, refactorings may be performed over multiple commits because of code complexity or other real development problems, which is why attempting to detect refactorings at single-commit granularity is insufficient. We observe that some refactorings can be detected only at coarser granularity, that is, changes spread across multiple commits. Herein, this type of refactoring is referred to as coarse-grained refactoring (CGR). We compared the refactorings detected on different granularities of commits from 19 open-source repositories. The results show that CGRs are common, and their frequency increases as the granularity becomes coarser. In addition, we found that Move-related refactorings tended to be the most frequent CGRs. We also analyzed the causes of CGR and suggested that CGRs will be valuable in refactoring research.

References

[1]
2012. mbassador. https://github.com/bennidi/mbassador.
[2]
2012. seyren. https://github.com/scobal/seyren.
[3]
2013. baasbox. https://github.com/baasbox/baasbox.
[4]
2013. GoClipse. https://github.com/GoClipse/goclipse.
[5]
2013. javapoet. https://github.com/square/javapoet.
[6]
2014. redisson. https://github.com/redisson/redisson.
[7]
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 12th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2012). 104--113.
[8]
Alexander Chávez, Isabella Ferreira, Eduardo Fernandes, Diego Cedrim, and Alessandro Garcia. 2017. How Does Refactoring Affect Internal Quality Attributes? A Multi-Project Study. In Proceedings of the 31st Brazilian Symposium on Software Engineering (SBES 2017). 74--83.
[9]
Lei Chen and Shinpei Hayashi. 2022. Appendix of "Impact of Change Granularity in Refactoring Detection".
[10]
Danny Dig, Can Comertoglu, Darko Marinov, and Ralph Johnson. 2006. Automated detection of refactorings in evolving components. In Proceedings of the 20th European Conference on Object-Oriented Programming (ECOOP 2006). 404--428.
[11]
Eduardo Fernandes, Alexander Chávez, Alessandro Garcia, Isabella Ferreira, Diego Cedrim, Leonardo Sousa, and Willian Oizumi. 2020. Refactoring effect on internal quality attributes: What haven't they told you yet? Information and Software Technology 126 (2020), 106347.
[12]
Stephen R. Foster, William G. Griswold, and Sorin Lerner. 2012. WitchDoctor: IDE support for real-time auto-completion of refactorings. In Proceedings of the 34th International Conference on Software Engineering (ICSE 2012). 222--232.
[13]
Xi Ge and Emerson Murphy-Hill. 2014. Manual Refactoring Changes with Automated Refactoring Validation. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). 1095--1105.
[14]
Shinpei Hayashi. 2018. git-stein. https://github.com/sh5i/git-stein.
[15]
Miryung Kim, Matthew Gee, Alex Loh, and Napol Rachatasumrit. 2010. Ref-Finder: A Refactoring Reconstruction Tool Based on Logic Query Templates. In Proceedings of the 18th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2010). 371--372.
[16]
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 2012). 1--11.
[17]
Miryung Kim, Thomas Zimmermann, and Nachiappan Nagappan. 2014. An empirical study of refactoring challenges and benefits at microsoft. IEEE Transactions on Software Engineering 40, 7 (2014), 633--649.
[18]
Kyle Prete, Napol Rachatasumrit, Nikita Sudan, and Miryung Kim. 2010. Template-based Reconstruction of Complex Refactorings. In Proceedings of the 26th IEEE International Conference on Software Maintenance (ICSM 2010). 1--10.
[19]
Danilo Silva, João Paulo da Silva, Gustavo Santos, Ricardo Terra, and Marco Tulio Valente. 2021. RefDiff 2.0: A Multi-Language Refactoring Detection Tool. IEEE Transactions on Software Engineering 47, 12 (2021), 2786--2802.
[20]
Danilo Silva, Nikolaos Tsantalis, and Marco Tulio Valente. 2016. Why we refactor? Confessions of GitHub contributors. In Proceedings of the 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2016). 858--870.
[21]
Danilo Silva and Marco Tulio Valente. 2017. RefDiff: Detecting Refactorings in Version Histories. In Proceedings of the 14th IEEE/ACM International Conference on Mining Software Repositories (MSR 2017). 269--279.
[22]
Nikolaos Tsantalis, Ameya Ketkar, and Danny Dig. 2020. RefactoringMiner 2.0. IEEE Transactions on Software Engineering 48, 3 (2020), 930--950.
[23]
Nikolaos Tsantalis, Matin Mansouri, Laleh M. Eshkevari, Davood Mazinanian, and Danny Dig. 2018. Accurate and Efficient Refactoring Detection in Commit History. In Proceedings of the 40th International Conference on Software Engineering (ICSE 2018). 483--494.
[24]
Peter Weißgerber and Stephan Diehl. 2006. Identifying Refactorings from Source-Code Changes. In Proceedings of the 21st International Conference on Automated Software Engineering (ASE 2006). 231--240.

Cited By

View all
  • (2023)Machine Learning-Based Exploration of the Impact of Move Method Refactoring on Object-Oriented Software Quality AttributesArabian Journal for Science and Engineering10.1007/s13369-023-08174-049:3(3867-3885)Online publication date: 21-Aug-2023

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPC '22: Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension
May 2022
698 pages
ISBN:9781450392983
DOI:10.1145/3524610
  • Conference Chairs:
  • Ayushi Rastogi,
  • Rosalia Tufano,
  • General Chair:
  • Gabriele Bavota,
  • Program Chairs:
  • Venera Arnaoudova,
  • Sonia Haiduc
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 the author(s) 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

In-Cooperation

  • IEEE CS

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 20 October 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. git
  2. refactoring detection
  3. squashed commit

Qualifiers

  • Short-paper

Funding Sources

  • JSPS Grants-in-Aid for Scientific Research

Conference

ICPC '22
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)25
  • Downloads (Last 6 weeks)3
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Machine Learning-Based Exploration of the Impact of Move Method Refactoring on Object-Oriented Software Quality AttributesArabian Journal for Science and Engineering10.1007/s13369-023-08174-049:3(3867-3885)Online publication date: 21-Aug-2023

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