Towards more accurate content categorization of API discussions

Bo Zhou, Xin Xia, David Lo, Cong Tian, Xinyu Wang

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

17 Citations (Scopus)

Abstract

Nowadays, software developers often discuss the usage of various APIs in online forums. Automatically assigning pre-defined semantic categorizes to API discussions in these forums could help manage the data in online forums, and assist developers to search for useful information. We refer to this process as content categorization of API discussions. To solve this problem, Hou and Mo proposed the usage of naive Bayes multinomial, which is an effective classification algorithm. In this paper, we propose a Cache-bAsed compoSitE algorithm, short formed as CASE, to automatically categorize API discussions. Considering that the content of an API discussion contains both textual description and source code, CASE has 3 components that analyze an API discussion in 3 different ways: Text, code, and original. In the text component, CASE only considers the textual description; in the code component, CASE only considers the source code; in the original component, CASE considers the original content of an API discussion which might include textual description and source code. Next, for each component, since different terms (i.e., words) have different affinities to different categories, CASE caches a subset of terms which have the highest affinity scores to each category, and builds a classifier based on the cached terms. Finally, CASE combines all the 3 classifiers to achieve a better accuracy score. We evaluate the performance of CASE on 3 datasets which contain a total of 1,035 API discussions. The experiment results show that CASE achieves accuracy scores of 0.69, 0.77, and 0.96 for the 3 datasets respectively, which outperforms the state-of-the-art method proposed by Hou and Mo by 11%, 10%, and 2%, respectively.

Original languageEnglish
Title of host publication22nd International Conference on Program Comprehension (ICPC 2014) - Proceedings
Subtitle of host publicationJune 2–3, 2014 Hyderabad, India
EditorsChanchal K. Roy, Andrew Begel, Leon Moonen
Place of PublicationNew York NY USA
PublisherAssociation for Computing Machinery (ACM)
Pages95-105
Number of pages11
ISBN (Electronic)9781450328791
DOIs
Publication statusPublished - 2014
Externally publishedYes
EventInternational Conference on Program Comprehension 2014 - Hyderabad, India
Duration: 2 Jun 20143 Jun 2014
Conference number: 22nd
https://web.archive.org/web/20180708093124/http://icpc2014.usask.ca/

Conference

ConferenceInternational Conference on Program Comprehension 2014
Abbreviated titleICPC 2014
CountryIndia
CityHyderabad
Period2/06/143/06/14
Internet address

Keywords

  • API Discussion
  • Cache-Based Method
  • Composite Method
  • Text Categorization

Cite this