arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.03270cs.SE
收藏

开发人员重构数据访问代码吗?实证研究

Do Developers Refactor Data Access Code? An Empirical Study

Biruk Asmare Muse, Foutse Khomh, Giuliano Antoniol

摘要:

开发人员经常重构代码以提高软件的可维护性和可理解性。对于传统软件系统中的重构活动有很多研究。然而,数据密集型系统中的重构还没有得到很好的探索。了解开发人员的重构实践是很重要的开发有效的工具support.We进行了一项纵向研究的重构活动的数据访问类使用12个数据密集型主题系统。我们调查了重构的流行和演变,以及重构与数据访问气味的关联。我们还对超过378个数据访问重构实例的样本进行了手动分析,以确定这些重构所针对的代码功能。我们的研究结果表明:(1)数据访问重构是普遍存在的,并在类型上有所不同。\textit{Rename variable}是最流行的数据访问重构。(2)重构的流行程度和类型随着系统的发展而变化。(3)大多数数据访问重构的目标代码实现数据获取和插入。(4)数据访问重构通常不涉及SQL查询。总体而言,结果表明,数据访问重构专注于提高代码质量,而不是底层的数据访问操作。因此,研究社区需要做更多的工作,为从业者提供意识和支持,了解通过重构解决数据访问气味的好处。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑