An Empirical Study on the Practice of Maintaining Object-Relational Mapping Code in Java']Java Systems

被引:0
作者
Chen, Tse-Hsun [1 ]
Shang, Weiyi [2 ]
Yang, Jinqiu [3 ]
Hassan, Ahmed E. [1 ]
Godfrey, Michael W. [3 ]
Nasser, Mohamed [4 ]
Flora, Parminder [4 ]
机构
[1] Queens Univ, Kingston, ON K7L 3N6, Canada
[2] Concordia Univ, Quebec City, PQ, Canada
[3] Univ Waterloo, Waterloo, ON N2L 3G1, Canada
[4] BlackBerry, Waterloo, ON, Canada
来源
13TH WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2016) | 2016年
关键词
SOFTWARE; EVOLUTION; INFORMATION;
D O I
10.1145/2901739.2901758
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Databases have become one of the most important components in modern software systems. For example, web services, cloud computing systems, and online transaction processing systems all rely heavily on databases. To abstract the complexity of accessing a database, developers make use of Object-Relational Mapping (ORM) frameworks. ORM frameworks provide an abstraction layer between the application logic and the underlying database. Such abstraction layer automatically maps objects in Object-Oriented Languages to database records, which significantly reduces the amount of boilerplate code that needs to be written. Despite the advantages of using ORM frameworks, we observe several difficulties in maintaining ORM code (i.e., code that makes use of ORM frameworks) when cooperating with our industrial partner. After conducting studies on other open source systems, we find that such difficulties are common in other Java systems. Our study finds that i) ORM cannot completely encapsulate database accesses in objects or abstract the underlying database technology, thus may cause ORM code changes more scattered; ii) ORM code changes are more frequent than regular code, but there is a lack of tools that help developers verify ORM code at compilation time; iii) we find that changes to ORM code are more commonly due to performance or security reasons; however, traditional static code analyzers need to be extended to capture the peculiarities of ORM code in order to detect such problems. Our study highlights the hidden maintenance costs of using ORM frameworks, and provides some initial insights about potential approaches to help maintain ORM code. Future studies should carefully examine ORM code, especially given the rising use of ORM in modern software systems.
引用
收藏
页码:165 / 176
页数:12
相关论文
共 44 条
[1]  
[Anonymous], P INT S SOFTW TEST A
[2]   Functional paleontology:: The evolution of user-visible system services [J].
Antón, AI ;
Potts, C .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2003, 29 (02) :151-166
[3]  
Bauer C., 2005, HIBERNATE ACTION
[4]  
Boslaugh S., 2008, Statistics in a nutshell-a desktop quick reference
[5]  
Chen T.-H., 2016, P 38 INT C SOFTW ENG
[6]  
Chen T. Y., TECHNICAL REPORT
[7]  
Chen T, 2014, PROCEEDINGS OF THE FIFTH INTERNATIONAL SYMPOSIUM ON TEST AUTOMATION & INSTRUMENTATION, VOLS 1 AND 2, P82
[8]   Detecting Performance Anti-patterns for Applications Developed using Object-Relational Mapping [J].
Chen, Tse-Hsun ;
Shang, Weiyi ;
Jiang, Zhen Ming ;
Hassan, Ahmed E. ;
Nasser, Mohamed ;
Flora, Parminder .
36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, :1001-1012
[9]  
Cliff N., 1996, Ordinal methods for behavioral data analysis
[10]  
Curino CA, 2008, ICEIS 2008: PROCEEDINGS OF THE TENTH INTERNATIONAL CONFERENCE ON ENTERPRISE INFORMATION SYSTEMS, VOL DISI, P323