We aim to explore how developers document their refactoring activities during the software life cycle. We call such activity Self-Affirmed Refactoring (SAR), which indicates developers' documentation of their refactoring activities. SAR is crucial in understanding various aspects of refactoring, including the motivation, procedure, and consequences of the performed code change. After that, we propose an approach to identify whether a commit describes developer-related refactoring events to classify them according to the refactoring common quality improvement categories. To complement this goal, we aim to reveal insights into how reviewers decide to accept or reject a submitted refactoring request and what makes such a review challenging.Our SAR taxonomy and model can work with refactoring detectors to report any early inconsistency between refactoring types and their documentation. They can serve as a solid background for various empirical investigations. Our survey with code reviewers has revealed several difficulties related to understanding the refactoring intent and implications on the functional and non-functional aspects of the software. In light of our findings from the industrial case study, we recommended a procedure to properly document refactoring activities, as part of our survey feedback.
翻译:我们旨在探究开发者在软件生命周期中如何记录其重构活动。我们将此类活动称为"自我确认重构"(Self-Affirmed Refactoring, SAR),即开发者对其重构行为的文档化记录。SAR对于理解重构的各个维度至关重要,包括重构动机、执行过程及代码变更结果。在此基础上,我们提出一种方法,用于识别提交记录中涉及开发者相关重构事件的内容,并依据通用质量提升类别对其进行分类。为补充这一目标,我们试图揭示审查者决定接受或拒绝重构请求的深层因素,以及此类审查过程中面临的挑战。我们的SAR分类体系与模型可与重构检测工具协同工作,及时报告重构类型与其文档记录之间的不一致性。这些成果可为各类实证研究奠定坚实基础。通过对代码审查者的调研,我们发现了理解重构意图及其对软件功能与非功能特性影响时存在的若干难点。基于工业案例研究的发现,我们建议了一套规范记录重构活动的流程,并作为调研反馈的重要组成部分。