Conclusion
API directive is one of the most important knowledge in API specifications. Existing approach only relies on syntactic patterns to detect API directives and lacks a deep semantic understanding. In this study, we propose a deep learning approach DeepDir to automatically detect API directives. Experimental results show that DeepDir significantly improves the state-of-the-art approach by 20.78% on average in terms of F-measure.
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Maalej W, Robillard M P. Patterns of knowledge in API reference documentation. IIEEE Trans Softw Eng, 2013, 39: 1264–1282
Jiang H, Zhang J X, Ren Z L, et al. An unsupervised approach for discovering relevant tutorial fragments for APIs. In: Proceedings of the 39th International Conference on Software Engineering (ICSE 17), 2017. 38–48
Huang Q, Xia X, Xing Z C, et al. API method recommendation without worrying about the task-API knowledge gap. In: Proceedings of International Conference on Automated Software Engineering (ASE 18), 2018. 293–304
Robillard M P, Chhetri Y B. Recommending reference API documentation. Empir Softw Eng, 2015, 20: 1558–1586
Monperrus M, Eichberg M, Tekes E, et al. What should developers be aware of? An empirical study on the directives of API documentation. Empir Softw Eng, 2012, 17: 703–737
Hu X, Li G, Xia X, et al. Deep code comment generation. In: Proceedings of IEEE International Conference on Program Comprehension (ICPC 18), 2018. 200–210
Chen X, Jiang H, Chen Z Y, et al. Automatic test report augmentation to assist crowdsourced testing. Front Comput Sci, 2019, 13: 943–959
Li X C, Jiang H, Kamei Y, et al. Bridging semantic gaps between natural languages and APIs with word embedding. IEEE Trans Softw Eng, 2020, 46: 1081–1097
Acknowledgements
This work was partially supported by National Key Research and Development Plan of China (Grant No. 2018YFB1003900).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Zhang, J., Jiang, H., Lu, S. et al. DeepDir: a deep learning approach for API directive detection. Sci. China Inf. Sci. 64, 199102 (2021). https://doi.org/10.1007/s11432-019-1520-6
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11432-019-1520-6