Skip to main content
Log in

DeepDir: a deep learning approach for API directive detection

Science China Information Sciences Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

References

  1. Maalej W, Robillard M P. Patterns of knowledge in API reference documentation. IIEEE Trans Softw Eng, 2013, 39: 1264–1282

    Article  Google Scholar 

  2. 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

  3. 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

  4. Robillard M P, Chhetri Y B. Recommending reference API documentation. Empir Softw Eng, 2015, 20: 1558–1586

    Article  Google Scholar 

  5. 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

    Article  Google Scholar 

  6. 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

  7. Chen X, Jiang H, Chen Z Y, et al. Automatic test report augmentation to assist crowdsourced testing. Front Comput Sci, 2019, 13: 943–959

    Article  Google Scholar 

  8. 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

    Article  Google Scholar 

Download references

Acknowledgements

This work was partially supported by National Key Research and Development Plan of China (Grant No. 2018YFB1003900).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jingxuan Zhang.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11432-019-1520-6

Navigation