An essential part of software maintenance and evolution, refactoring is performed by developers, regardless of technology or domain, to improve the internal quality of the system, and reduce its technical debt. However, choosing the appropriate refactoring strategy is not always straightforward, resulting in developers seeking assistance. Although research in refactoring is well-established, with several studies altering between the detection of refactoring opportunities and the recommendation of appropriate code changes, little is known about their adoption in practice. Analyzing the perception of developers is critical to understand better what developers consider to be problematic in their code and how they handle it. Additionally, there is a need for bridging the gap between refactoring, as research, and its adoption in practice, by extracting common refactoring intents that are more suitable for what developers face in reality. In this study, we analyze refactoring discussions on Stack Overflow through a series of quantitative and qualitative experiments. Our results show that Stack Overflow is utilized by a diverse set of developers for refactoring assistance for a variety of technologies. Our observations show five areas that developers typically require help with refactoring -- Code Optimization, Tools and IDEs, Architecture and Design Patterns, Unit Testing, and Database. We envision our findings better bridge the support between traditional (or academic) aspects of refactoring and their real-world applicability, including better tool support.
翻译:软件维护和演进的一个重要部分是,由开发商(不论其技术或领域如何)进行软件维护和演进,对开发商进行重新设定,以提高系统的内部质量,并减少其技术债务。然而,选择适当的再设定战略并非总是直截了当的,因此开发商寻求援助。虽然对再设定的研究已经确立,几项研究改变了对再设定机会的检测和对适当代码修改的建议之间的关联,但在实践中很少了解其采用情况。分析开发商的认知对于更好地了解开发商认为其代码中哪些问题及其处理方法至关重要。此外,我们需要通过提取更适合开发商现实状况的共同再设定意图,弥合作为研究的再设定及其在实践中的采用之间的差距。在本研究中,我们通过一系列定量和定性的实验,分析关于Stack 过度流的重新设定讨论。我们的结果显示,堆过流被一批不同的开发商利用来为各种技术的再设定援助。我们的观测显示,5个领域是,开发商通常需要帮助进行再设定的重新设定,包括对数据库、软件、软件的改进模型和模型的改进。