当前位置: X-MOL 学术Empir. Software Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Feature requests-based recommendation of software refactorings
Empirical Software Engineering ( IF 3.5 ) Pub Date : 2020-08-28 , DOI: 10.1007/s10664-020-09871-2
Ally S. Nyamawe , Hui Liu , Nan Niu , Qasim Umer , Zhendong Niu

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 learning-based approach that recommends refactorings based on the history of the previously requested features, applied refactorings, and code smells information. First, the state-of-the-art 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 % ).

中文翻译:

基于功能请求的软件重构推荐

软件需求不断变化,这往往会导致软件进化。因此,在整个软件生命周期中,开发人员会收到通常表示为功能请求的新需求。为了实现所请求的功能,开发人员有时会应用重构来使他们的系统适应新的需求。然而,决定应用哪些重构通常具有挑战性,并且仍然缺乏自动支持来推荐给定功能请求的重构。为此,我们提出了一种基于学习的方法,该方法根据先前请求的功能、应用的重构和代码异味信息的历史记录推荐重构。首先,利用最先进的重构检测工具来识别用于实现过去功能请求的先前重构。第二,机器分类器使用功能请求的历史数据、代码味道和应用于相应提交的重构进行训练。因此,机器分类器用于预测新功能请求的重构。该方法在 55 个开源 Java 项目的数据集上进行了评估,结果表明它可以准确地推荐重构(准确率高达 83.19%)。
更新日期:2020-08-28
down
wechat
bug