当前位置: X-MOL 学术IEEE Trans. Softw. Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
An Interactive and Dynamic Search-Based Approach to Software Refactoring Recommendations
IEEE Transactions on Software Engineering ( IF 6.5 ) Pub Date : 2020-09-01 , DOI: 10.1109/tse.2018.2872711
Vahid Alizadeh , Marouane Kessentini , Mohamed Wiem Mkaouer , Mel Ocinneide , Ali Ouni , Yuanfang Cai

Successful software products evolve through a process of continual change. However, this process may weaken the design of the software and make it unnecessarily complex, leading to significantly reduced productivity and increased fault-proneness. Refactoring improves the software design while preserving overall functionality and behavior, and is an important technique in managing the growing complexity of software systems. Most of the existing work on software refactoring uses either an entirely manual or a fully automated approach. Manual refactoring is time-consuming, error-prone and unsuitable for large-scale, radical refactoring. On the other hand, fully automated refactoring yields a static list of refactorings which, when applied, leads to a new and often hard to comprehend design. Furthermore, it is difficult to merge these refactorings with other changes performed in parallel by developers. In this paper, we propose a refactoring recommendation approach that dynamically adapts and interactively suggests refactorings to developers and takes their feedback into consideration. Our approach uses NSGA-II to find a set of good refactoring solutions that improve software quality while minimizing the deviation from the initial design. These refactoring solutions are then analyzed to extract interesting common features between them such as the frequently occurring refactorings in the best non-dominated solutions. Based on this analysis, the refactorings are ranked and suggested to the developer in an interactive fashion as a sequence of transformations. The developer can approve, modify or reject each of the recommended refactorings, and this feedback is then used to update the proposed rankings of recommended refactorings. After a number of introduced code changes and interactions with the developer, the interactive NSGA-II algorithm is executed again on the new modified system to repair the set of refactoring solutions based on the new changes and the feedback received from the developer. We evaluated our approach on a set of eight open source systems and two industrial projects provided by an industrial partner. Statistical analysis of our experiments shows that our dynamic interactive refactoring approach performed significantly better than four existing search-based refactoring techniques and one fully-automated refactoring tool not based on heuristic search.

中文翻译:

一种基于交互式和动态搜索的软件重构建议方法

成功的软件产品在不断变化的过程中发展。但是,此过程可能会削弱软件的设计并使其变得不必要地复杂,从而导致生产力显着降低并增加故障倾向。重构改进了软件设计,同时保留了整体功能和行为,并且是管理日益复杂的软件系统的一项重要技术。大多数现有的软件重构工作都使用完全手动或完全自动化的方法。手动重构耗时、容易出错,不适合大规模、彻底的重构。另一方面,完全自动化的重构会产生一个静态的重构列表,当应用它时,会导致一个新的并且通常难以理解的设计。此外,很难将这些重构与开发人员并行执行的其他更改合并。在本文中,我们提出了一种重构推荐方法,该方法动态适应并向开发人员交互地建议重构,并考虑他们的反馈。我们的方法使用 NSGA-II 来找到一组良好的重构解决方案,以提高软件质量,同时最大限度地减少与初始设计的偏差。然后分析这些重构解决方案以提取它们之间有趣的共同特征,例如最佳非支配解决方案中频繁发生的重构。基于此分析,重构被排序并作为一系列转换以交互方式向开发人员建议。开发人员可以批准、修改或拒绝每个推荐的重构,然后使用此反馈来更新推荐重构的建议排名。经过多次引入的代码更改和与开发人员的交互后,在新修改的系统上再次执行交互式 NSGA-II 算法,以根据新的更改和从开发人员收到的反馈来修复重构解决方案集。我们在一组八个开源系统和一个工业合作伙伴提供的两个工业项目上评估了我们的方法。我们实验的统计分析表明,我们的动态交互式重构方法的性能明显优于四种现有的基于搜索的重构技术和一种不基于启发式搜索的全自动重构工具。经过多次引入的代码更改和与开发人员的交互后,在新修改的系统上再次执行交互式 NSGA-II 算法,以根据新的更改和从开发人员收到的反馈来修复重构解决方案集。我们在一组八个开源系统和一个工业合作伙伴提供的两个工业项目上评估了我们的方法。我们实验的统计分析表明,我们的动态交互式重构方法的性能明显优于四种现有的基于搜索的重构技术和一种不基于启发式搜索的全自动重构工具。经过多次引入的代码更改和与开发人员的交互后,在新修改的系统上再次执行交互式 NSGA-II 算法,以根据新的更改和从开发人员收到的反馈来修复重构解决方案集。我们在一组八个开源系统和一个工业合作伙伴提供的两个工业项目上评估了我们的方法。我们实验的统计分析表明,我们的动态交互式重构方法的性能明显优于四种现有的基于搜索的重构技术和一种不基于启发式搜索的全自动重构工具。在新修改的系统上再次执行交互式 NSGA-II 算法,以根据新更改和从开发人员收到的反馈修复重构解决方案集。我们在一组八个开源系统和一个工业合作伙伴提供的两个工业项目上评估了我们的方法。我们实验的统计分析表明,我们的动态交互式重构方法的性能明显优于四种现有的基于搜索的重构技术和一种不基于启发式搜索的全自动重构工具。在新修改的系统上再次执行交互式 NSGA-II 算法,以根据新更改和从开发人员收到的反馈修复重构解决方案集。我们在一组八个开源系统和一个工业合作伙伴提供的两个工业项目上评估了我们的方法。我们实验的统计分析表明,我们的动态交互式重构方法的性能明显优于四种现有的基于搜索的重构技术和一种不基于启发式搜索的全自动重构工具。
更新日期:2020-09-01
down
wechat
bug