Identifying rename refactoring opportunities based on feature requests

Autor: Nyamawe, Ally S., Bakhti, Khadidja, Sandiwarno, Sulis
Zdroj: International Journal of Computers and Applications; August 2022, Vol. 44 Issue: 8 p770-778, 9p
Abstrakt: 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 precision and recall.
Databáze: Supplemental Index