论文标题
开发人员重构数据访问代码是否?一项实证研究
Do Developers Refactor Data Access Code? An Empirical Study
论文作者
论文摘要
开发人员通常会重构代码以提高软件的可维护性和理解。关于传统软件系统中的重构活动有许多研究。但是,在数据密集型系统中进行重构并未得到很好的探索。了解开发人员的重构实践对于开发有效的工具支持很重要。我们使用12个数据密集型主题系统进行了对数据访问类别的重构活动的纵向研究。我们研究了重构的流行和演变以及重构与数据访问气味的关联。我们还对378个数据访问重构实例进行了手动分析,以识别该重构针对的代码的功能。我们的结果表明,(1)数据访问重构是普遍的,类型不同。 \ textIt {Rename变量}是最普遍的数据访问重构。 (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.