AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
Article Link
Collect
Submit Manuscript
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Regular Paper

Discovering API Directives from API Specifications with Text Classification

College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
Key Laboratory of Safety-Critical Software (Nanjing University of Aeronautics and Astronautics), Ministry of Industry and Information Technology, Nanjing 210016, China
Key Laboratory of Complex Systems Modeling and Simulation (Hangzhou Dianzi University), Ministry of Education Hangzhou 310018, China
School of Computer Science and Technology, Hangzhou Dianzi University, Hangzhou 310018, China
Show Author Information

Abstract

Application programming interface (API) libraries are extensively used by developers. To correctly program with APIs and avoid bugs, developers shall pay attention to API directives, which illustrate the constraints of APIs. Unfortunately, API directives usually have diverse morphologies, making it time-consuming and error-prone for developers to discover all the relevant API directives. In this paper, we propose an approach leveraging text classification to discover API directives from API specifications. Specifically, given a set of training sentences in API specifications, our approach first characterizes each sentence by three groups of features. Then, to deal with the unequal distribution between API directives and non-directives, our approach employs an under-sampling strategy to split the imbalanced training set into several subsets and trains several classifiers. Given a new sentence in an API specification, our approach synthesizes the trained classifiers to predict whether it is an API directive. We have evaluated our approach over a publicly available annotated API directive corpus. The experimental results reveal that our approach achieves an F-measure value of up to 82.08%. In addition, our approach statistically outperforms the state-of-the-art approach by up to 29.67% in terms of F-measure.

Electronic Supplementary Material

Download File(s)
jcst-36-4-922-Highlights.pdf (335.1 KB)

References

【1】
【1】
 
 
Journal of Computer Science and Technology
Pages 922-943

{{item.num}}

Comments on this article

Go to comment

< Back to all reports

Review Status: {{reviewData.commendedNum}} Commended , {{reviewData.revisionRequiredNum}} Revision Required , {{reviewData.notCommendedNum}} Not Commended Under Peer Review

Review Comment

Close
Close
Cite this article:
Zhang J-X, Tao C-Q, Huang Z-Q, et al. Discovering API Directives from API Specifications with Text Classification. Journal of Computer Science and Technology, 2021, 36(4): 922-943. https://doi.org/10.1007/s11390-021-0235-1

1022

Views

5

Crossref

4

Web of Science

4

Scopus

0

CSCD

Received: 18 December 2019
Accepted: 09 June 2021
Published: 05 July 2021
©Institute of Computing Technology, Chinese Academy of Sciences 2021