Developers often refactor code to improve the maintainability and comprehension of the software. There are many studies on refactoring activities in traditional software systems. However, refactoring in data-intensive systems is not well explored. Understanding the refactoring practices of developers is important to develop efficient tool support.We conducted a longitudinal study of refactoring activities in data access classes using 12 data-intensive subject systems. We investigated the prevalence and evolution of refactorings and the association of refactorings with data access smells. We also conducted a manual analysis of over 378 samples of data access refactoring instances to identify the functionalities of the code that are targeted by such refactorings. Our results show that (1) data access refactorings are prevalent and different in type. \textit{Rename variable} is the most prevalent data access refactoring. (2) The prevalence and type of refactorings vary as systems evolve in time. (3) Most data access refactorings target codes that implement data fetching and insertion. (4) Data access refactorings do not generally touch SQL queries. Overall, the results show that data access refactorings focus on improving the code quality but not the underlying data access operations. Hence, more work is needed from the research community on providing awareness and support to practitioners on the benefits of addressing data access smells with refactorings.
翻译:开发者通常对软件的维护性和理解性进行重新设定代码,对传统软件系统中的重新设定活动进行了许多研究,但对传统软件系统中的重新设定活动进行了许多研究,然而,对数据密集系统中的重新设定活动没有很好地探讨。了解开发者的重新设定做法对于开发高效工具支持十分重要。我们利用12个数据密集主题系统对数据存取类中的重新设定活动进行了纵向研究。我们调查了再设定因素的普及和演变情况,以及再设定因素与数据存取的味道之间的联系。我们还对378个数据存取和插入抽样进行了手工分析,以确定这类重新设定所针对的代码的功能。我们的结果显示:(1)数据存取的重新设定做法非常普遍,类型也不同。\textit{Rename变量}是数据存取最普遍的重新定义。(2) 重新设定因素的普及和类型随着系统的变化而变化。(3) 多数数据存取和插入数据的目标代码是执行数据提取和插入的。(4) 数据存取和存取目标代码与数据再设定数据再设定目标代码没有一般地接触这种代码,但是一般地接触SQL操作的功能显示需要的数据检索结果。