Feature requests-based recommendation of software refactorings
- PDF / 1,606,606 Bytes
- 33 Pages / 439.642 x 666.49 pts Page_size
- 28 Downloads / 242 Views
Feature requests-based recommendation of software refactorings Ally S. Nyamawe1
· Hui Liu1 · Nan Niu2 · Qasim Umer1 · Zhendong Niu1
© Springer Science+Business Media, LLC, part of Springer Nature 2020
Abstract Software requirements are ever-changing which often leads to software evolution. Consequently, throughout software lifetime, developers receive new requirements often expressed as feature requests. To implement the requested features, developers sometimes apply refactorings to make their systems adapt to the new requirements. However, deciding what refactorings to apply is often challenging and there is still lack of automated support to recommend refactorings given a feature request. To this end, we propose a learningbased approach that recommends refactorings based on the history of the previously requested features, applied refactorings, and code smells information. First, the state-of-theart refactoring detection tools are leveraged to identify the previous refactorings applied to implement the past feature requests. Second, a machine classifier is trained with the history data of the feature requests, code smells, and refactorings applied on the respective commits. Consequently, the machine classifier is used to predict refactorings for new feature requests. The proposed approach is evaluated on the dataset of 55 open source Java projects and the results suggest that it can accurately recommend refactorings (accuracy is up to 83.19%). Keywords Feature requests · Code smells · Machine learning · Recommendation · Software refactoring
1 Introduction Requirements change is inevitable as the business, technologies, and stakeholder demands continuously evolve (Jayatilleke et al. 2018). The adaptation to ever-changing software requirements is one of the key factors for the evolution of software systems. During software evolution, developers often receive new requirements expressed as feature requests which demand for the implementation of a new functionality or enhancement of an existing feature. The most common and dominant means to track and manage feature requests is the Communicated by: Kelly Blincoe, Daniela Damian, and Anna Perini This article belongs to the Topical Collection: Requirements Engineering Hui Liu
[email protected]
Extended author information available on the last page of the article.
Empirical Software Engineering
use of issue tracking systems e.g JIRA (2019), Bugzilla (2019), and GitHub Issue Tracker (2019). Through issue tracker, a feature request can be discussed, assigned to a developer, and keep track of its status (Heck and Zaidman 2013). To implement the requested feature, first, developers usually need to locate the source code that should be modified. As a result, several techniques have been proposed to leverage feature requests to locate (e.g., based on requirements traceability and text similarity) and recommend software entities (e.g., API methods) that can be used to implement the requested feature (Thung et al. 2013; Niu et al. 2014; Palomba et al. 2017). Second,
Data Loading...