详细信息
HQLgen: deep learning based HQL query generation from program context ( SCI-EXPANDED收录 EI收录)
文献类型:期刊文献
英文题名:HQLgen: deep learning based HQL query generation from program context
作者:Zhou, Ziyi[1];Yu, Huiqun[1];Fan, Guisheng[1];Huang, Zijie[1];Yang, Kang[1];Zhang, Jiayin[2]
机构:[1]East China Univ Sci & Technol, Dept Comp Sci & Engn, Shanghai, Peoples R China;[2]East China Univ Sci & Technol, Dept Control Sci & Engn, Shanghai, Peoples R China
年份:2022
卷号:29
期号:2
外文期刊名:AUTOMATED SOFTWARE ENGINEERING
收录:;EI(收录号:20223812765604);WOS:【SCI-EXPANDED(收录号:WOS:000850560600001)】;
基金:This work was supported by the National Natural Science Foundation of China (No. 61772200), Shanghai Natural Science Foundation (No. 21ZR1416300).
语种:英文
外文关键词:Object relational mapping; HQL query generation; Deep learning; Program comprehension
摘要:To facilitate Object-Oriented Programming (OOP) in data persistence, practitioners use Object Relational-Mapping (ORM) framework to map data bidirectionally between data classes and tables of Relational Database Management System (RDBMS). In terms of Java applications, the most trending ORM solution is Hibernate, where Hibernate Query Language (HQL) is proposed to perform customizable queries in an OOP style. However, HQL queries are hard to implement and maintain due to their flexibility and complexity. To address these issues, we propose a model called HQLgen that combines deep learning and template to automatically generate HQL queries from program context. It employs recurrent neural network to learn the contextual information of Java program, and predicts the key elements within HQL clauses via attention mechanism. To construct the dataset for model training and evaluation, we locate and extract projects containing HQL queries on GitHub followed by extensive cleaning and preprocessing, and finally obtain 24,118 HQL queries from 3,481 projects. Experimental results show that the proposed approach achieves an accuracy of 34.52% on predicting simple HQL queries. In addition, we release the collected dataset for future research interest.
参考文献:
正在载入数据...
