139
Views
1
CrossRef citations to date
0
Altmetric
Articles

Identifying rename refactoring opportunities based on feature requests

ORCID Icon, &
Pages 770-778 | Received 22 Aug 2020, Accepted 20 Apr 2021, Published online: 05 May 2021
 

Abstract

Refactoring is a widespread practice of improving the quality of software systems by applying changes on their internal structures without affecting their observable behaviors. Rename is one of the most recurring and widely used refactoring operation. A rename refactoring is often required when a software entity was poorly named in the beginning or its semantics have changed and therefore should be renamed to reflect its new semantics. However, identifying renaming opportunities is often challenging as it involves several aspects including source code semantics, natural language understanding and developer's experience. To this end, we propose a new approach to identify rename refactoring opportunities by leveraging feature requests. The rationale is that, when implementing a feature request there are chances that the semantics of software entities could significantly change to fulfill the requested feature. Consequently, their names should be modified as well to portray their latest semantics. The approach employs textual similarity to assess the similarity between a feature request description and identifiers. The approach has been validated on the dataset of 15 open source Java applications by comparing the recommended renaming opportunities against those recovered from the refactoring history of the involved subject applications. The evaluation results suggest that, the proposed approach can identify renaming opportunities on up to 66% precision and 72% recall.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Notes

Additional information

Notes on contributors

Ally S. Nyamawe

Ally S. Nyamawe received B.Sc. degree in Computer Science from the University of Dar es Salaam, Tanzania in 2008, M.Sc. in Computer Science from The University of Dodoma, Tanzania in 2011, and Ph.D. degree in Computer Science and Technology from the Beijing Institute of Technology, China in 2020. He is currently serving The University of Dodoma as Lecturer in the Department of Computer Science and Engineering. His research interests include Software Refactoring, Software Requirements Engineering, Requirements Traceability and Computer Programming.

Khadidja Bakhti

Khadidja Bakhti received her Master degree in Computer Science from Mostaganem University, Algeria in 2014, and Ph.D. degree in Computer Science and Technology from the Beijing Institute of Technology, China in 2018. She is a researcher at Algerian satellite, spatial Agency in Algeria. Her research interests include function analysis, machine learning, deep learning, citation analysis, and data mining.

Sulis Sandiwarno

Sulis Sandiwarno received his B.Sc. in Computer Science in 2010 from the Universitas Mercu Buana, Indonesia and the M.Sc. in Computer Science in 2012 from the Universitas Budi Luhur, Indonesia. He is currently pursuing the Ph.D. degree with the School of Computer Science and Technology, Beijing Institute of Technology, China. He is a Lecturer at the Department of Computer Science, Universitas Mercu Buana. His research interests include analysis of information system, e-learning system techniques, data mining, opinion mining, and computer programming.

Reprints and Corporate Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

To request a reprint or corporate permissions for this article, please click on the relevant link below:

Academic Permissions

Please note: Selecting permissions does not provide access to the full text of the article, please see our help page How do I view content?

Obtain permissions instantly via Rightslink by clicking on the button below:

If you are unable to obtain permissions via Rightslink, please complete and submit this Permissions form. For more information, please visit our Permissions help page.