Automatic API Usage Scenario Documentation from Technical Q&A Sites

The online technical Q&A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research works have thus focused on augmenting official API documentation with insights (e...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:ACM transactions on software engineering and methodology 2021-05, Vol.30 (3), p.1-45, Article 31
Hauptverfasser: Uddin, Gias, Khomh, Foutse, Roy, Chanchal K.
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 45
container_issue 3
container_start_page 1
container_title ACM transactions on software engineering and methodology
container_volume 30
creator Uddin, Gias
Khomh, Foutse
Roy, Chanchal K.
description The online technical Q&A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research works have thus focused on augmenting official API documentation with insights (e.g., code examples) from SO. The techniques propose to add code examples/insights about APIs into its official documentation. Recently, surveys of software developers find that developers in SO consider the combination of code examples and reviews about APIs as a form of API documentation, and that they consider such a combination to be more useful than official API documentation when the official resources can be incomplete, ambiguous, incorrect, and outdated. Reviews are opinionated sentences with positive/negative sentiments. However, we are aware of no previous research that attempts to automatically produce API documentation from SO by considering both API code examples and reviews. In this article, we present two novel algorithms that can be used to automatically produce API documentation from SO by combining code examples and reviews towards those examples. The first algorithm is called statistical documentation, which shows the distribution of positivity and negativity around the code examples of an API using different metrics (e.g., star ratings). The second algorithm is called concept-based documentation, which clusters similar and conceptually relevant usage scenarios. An API usage scenario contains a code example, a textual description of the underlying task addressed by the code example, and the reviews (i.e., opinions with positive and negative sentiments) from other developers towards the code example. We deployed the algorithms in Opiner, a web-based platform to aggregate information about APIs from online forums. We evaluated the algorithms by mining all Java JSON-based posts in SO and by conducting three user studies based on produced documentation from the posts. The first study is a survey, where we asked the participants to compare our proposed algorithms against a Javadoc-syle documentation format (called as Type-based documentation in Opiner). The participants were asked to compare along four development scenarios (e.g., selection, documentation). The participants preferred our proposed two algorithms over type-based documentation. In our second user study, we asked the participants to complete four coding tasks using Opiner and the API offici
doi_str_mv 10.1145/3439769
format Article
fullrecord <record><control><sourceid>acm_cross</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3439769</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3439769</sourcerecordid><originalsourceid>FETCH-LOGICAL-a244t-d84330827fac723c9e1be0e03612daa53722f872e7b04c8cc01e924cf805c5ce3</originalsourceid><addsrcrecordid>eNo9j8FLwzAYxYMoOKd495STnqpJvnRpjqVOHQxUtoG3kn37opW1kaQ7-N9b2fT0HrwfD36MXUpxK6XO70CDNRN7xEYyz01mwKrjoQttMwD5dsrOUvoUQoJQesSqcteH1vUN8vJlxlfJvRNfIHUuNoHfB9y11PXDHjruY2j5kvCja9Bt-et1yRdNT-mcnXi3TXRxyDFbPUyX1VM2f36cVeU8c0rrPtsUGkAUyniHRgFakmsSJGAi1ca5HIxSvjCKzFpoLBCFJKs0-kLkmCPBmN3sfzGGlCL5-is2rYvftRT1r3t9cB_Iqz3psP2H_sYfQSVScg</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Automatic API Usage Scenario Documentation from Technical Q&amp;A Sites</title><source>ACM Digital Library Complete</source><creator>Uddin, Gias ; Khomh, Foutse ; Roy, Chanchal K.</creator><creatorcontrib>Uddin, Gias ; Khomh, Foutse ; Roy, Chanchal K.</creatorcontrib><description>The online technical Q&amp;A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research works have thus focused on augmenting official API documentation with insights (e.g., code examples) from SO. The techniques propose to add code examples/insights about APIs into its official documentation. Recently, surveys of software developers find that developers in SO consider the combination of code examples and reviews about APIs as a form of API documentation, and that they consider such a combination to be more useful than official API documentation when the official resources can be incomplete, ambiguous, incorrect, and outdated. Reviews are opinionated sentences with positive/negative sentiments. However, we are aware of no previous research that attempts to automatically produce API documentation from SO by considering both API code examples and reviews. In this article, we present two novel algorithms that can be used to automatically produce API documentation from SO by combining code examples and reviews towards those examples. The first algorithm is called statistical documentation, which shows the distribution of positivity and negativity around the code examples of an API using different metrics (e.g., star ratings). The second algorithm is called concept-based documentation, which clusters similar and conceptually relevant usage scenarios. An API usage scenario contains a code example, a textual description of the underlying task addressed by the code example, and the reviews (i.e., opinions with positive and negative sentiments) from other developers towards the code example. We deployed the algorithms in Opiner, a web-based platform to aggregate information about APIs from online forums. We evaluated the algorithms by mining all Java JSON-based posts in SO and by conducting three user studies based on produced documentation from the posts. The first study is a survey, where we asked the participants to compare our proposed algorithms against a Javadoc-syle documentation format (called as Type-based documentation in Opiner). The participants were asked to compare along four development scenarios (e.g., selection, documentation). The participants preferred our proposed two algorithms over type-based documentation. In our second user study, we asked the participants to complete four coding tasks using Opiner and the API official and informal documentation resources. The participants were more effective and accurate while using Opiner. In a subsequent survey, more than 80% of participants asked the Opiner documentation platform to be integrated into the formal API documentation to complement and improve the API official documentation.</description><identifier>ISSN: 1049-331X</identifier><identifier>EISSN: 1557-7392</identifier><identifier>DOI: 10.1145/3439769</identifier><language>eng</language><publisher>New York, NY, USA: ACM</publisher><subject>Documentation ; Search-based software engineering ; Software and its engineering ; Software creation and management ; Software post-development issues</subject><ispartof>ACM transactions on software engineering and methodology, 2021-05, Vol.30 (3), p.1-45, Article 31</ispartof><rights>ACM</rights><lds50>peer_reviewed</lds50><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-a244t-d84330827fac723c9e1be0e03612daa53722f872e7b04c8cc01e924cf805c5ce3</citedby><cites>FETCH-LOGICAL-a244t-d84330827fac723c9e1be0e03612daa53722f872e7b04c8cc01e924cf805c5ce3</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktopdf>$$Uhttps://dl.acm.org/doi/pdf/10.1145/3439769$$EPDF$$P50$$Gacm$$H</linktopdf><link.rule.ids>314,776,780,2276,27901,27902,40172,75971</link.rule.ids></links><search><creatorcontrib>Uddin, Gias</creatorcontrib><creatorcontrib>Khomh, Foutse</creatorcontrib><creatorcontrib>Roy, Chanchal K.</creatorcontrib><title>Automatic API Usage Scenario Documentation from Technical Q&amp;A Sites</title><title>ACM transactions on software engineering and methodology</title><addtitle>ACM TOSEM</addtitle><description>The online technical Q&amp;A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research works have thus focused on augmenting official API documentation with insights (e.g., code examples) from SO. The techniques propose to add code examples/insights about APIs into its official documentation. Recently, surveys of software developers find that developers in SO consider the combination of code examples and reviews about APIs as a form of API documentation, and that they consider such a combination to be more useful than official API documentation when the official resources can be incomplete, ambiguous, incorrect, and outdated. Reviews are opinionated sentences with positive/negative sentiments. However, we are aware of no previous research that attempts to automatically produce API documentation from SO by considering both API code examples and reviews. In this article, we present two novel algorithms that can be used to automatically produce API documentation from SO by combining code examples and reviews towards those examples. The first algorithm is called statistical documentation, which shows the distribution of positivity and negativity around the code examples of an API using different metrics (e.g., star ratings). The second algorithm is called concept-based documentation, which clusters similar and conceptually relevant usage scenarios. An API usage scenario contains a code example, a textual description of the underlying task addressed by the code example, and the reviews (i.e., opinions with positive and negative sentiments) from other developers towards the code example. We deployed the algorithms in Opiner, a web-based platform to aggregate information about APIs from online forums. We evaluated the algorithms by mining all Java JSON-based posts in SO and by conducting three user studies based on produced documentation from the posts. The first study is a survey, where we asked the participants to compare our proposed algorithms against a Javadoc-syle documentation format (called as Type-based documentation in Opiner). The participants were asked to compare along four development scenarios (e.g., selection, documentation). The participants preferred our proposed two algorithms over type-based documentation. In our second user study, we asked the participants to complete four coding tasks using Opiner and the API official and informal documentation resources. The participants were more effective and accurate while using Opiner. In a subsequent survey, more than 80% of participants asked the Opiner documentation platform to be integrated into the formal API documentation to complement and improve the API official documentation.</description><subject>Documentation</subject><subject>Search-based software engineering</subject><subject>Software and its engineering</subject><subject>Software creation and management</subject><subject>Software post-development issues</subject><issn>1049-331X</issn><issn>1557-7392</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2021</creationdate><recordtype>article</recordtype><recordid>eNo9j8FLwzAYxYMoOKd495STnqpJvnRpjqVOHQxUtoG3kn37opW1kaQ7-N9b2fT0HrwfD36MXUpxK6XO70CDNRN7xEYyz01mwKrjoQttMwD5dsrOUvoUQoJQesSqcteH1vUN8vJlxlfJvRNfIHUuNoHfB9y11PXDHjruY2j5kvCja9Bt-et1yRdNT-mcnXi3TXRxyDFbPUyX1VM2f36cVeU8c0rrPtsUGkAUyniHRgFakmsSJGAi1ca5HIxSvjCKzFpoLBCFJKs0-kLkmCPBmN3sfzGGlCL5-is2rYvftRT1r3t9cB_Iqz3psP2H_sYfQSVScg</recordid><startdate>20210501</startdate><enddate>20210501</enddate><creator>Uddin, Gias</creator><creator>Khomh, Foutse</creator><creator>Roy, Chanchal K.</creator><general>ACM</general><scope>AAYXX</scope><scope>CITATION</scope></search><sort><creationdate>20210501</creationdate><title>Automatic API Usage Scenario Documentation from Technical Q&amp;A Sites</title><author>Uddin, Gias ; Khomh, Foutse ; Roy, Chanchal K.</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a244t-d84330827fac723c9e1be0e03612daa53722f872e7b04c8cc01e924cf805c5ce3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2021</creationdate><topic>Documentation</topic><topic>Search-based software engineering</topic><topic>Software and its engineering</topic><topic>Software creation and management</topic><topic>Software post-development issues</topic><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Uddin, Gias</creatorcontrib><creatorcontrib>Khomh, Foutse</creatorcontrib><creatorcontrib>Roy, Chanchal K.</creatorcontrib><collection>CrossRef</collection><jtitle>ACM transactions on software engineering and methodology</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Uddin, Gias</au><au>Khomh, Foutse</au><au>Roy, Chanchal K.</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Automatic API Usage Scenario Documentation from Technical Q&amp;A Sites</atitle><jtitle>ACM transactions on software engineering and methodology</jtitle><stitle>ACM TOSEM</stitle><date>2021-05-01</date><risdate>2021</risdate><volume>30</volume><issue>3</issue><spage>1</spage><epage>45</epage><pages>1-45</pages><artnum>31</artnum><issn>1049-331X</issn><eissn>1557-7392</eissn><abstract>The online technical Q&amp;A site Stack Overflow (SO) is popular among developers to support their coding and diverse development needs. To address shortcomings in API official documentation resources, several research works have thus focused on augmenting official API documentation with insights (e.g., code examples) from SO. The techniques propose to add code examples/insights about APIs into its official documentation. Recently, surveys of software developers find that developers in SO consider the combination of code examples and reviews about APIs as a form of API documentation, and that they consider such a combination to be more useful than official API documentation when the official resources can be incomplete, ambiguous, incorrect, and outdated. Reviews are opinionated sentences with positive/negative sentiments. However, we are aware of no previous research that attempts to automatically produce API documentation from SO by considering both API code examples and reviews. In this article, we present two novel algorithms that can be used to automatically produce API documentation from SO by combining code examples and reviews towards those examples. The first algorithm is called statistical documentation, which shows the distribution of positivity and negativity around the code examples of an API using different metrics (e.g., star ratings). The second algorithm is called concept-based documentation, which clusters similar and conceptually relevant usage scenarios. An API usage scenario contains a code example, a textual description of the underlying task addressed by the code example, and the reviews (i.e., opinions with positive and negative sentiments) from other developers towards the code example. We deployed the algorithms in Opiner, a web-based platform to aggregate information about APIs from online forums. We evaluated the algorithms by mining all Java JSON-based posts in SO and by conducting three user studies based on produced documentation from the posts. The first study is a survey, where we asked the participants to compare our proposed algorithms against a Javadoc-syle documentation format (called as Type-based documentation in Opiner). The participants were asked to compare along four development scenarios (e.g., selection, documentation). The participants preferred our proposed two algorithms over type-based documentation. In our second user study, we asked the participants to complete four coding tasks using Opiner and the API official and informal documentation resources. The participants were more effective and accurate while using Opiner. In a subsequent survey, more than 80% of participants asked the Opiner documentation platform to be integrated into the formal API documentation to complement and improve the API official documentation.</abstract><cop>New York, NY, USA</cop><pub>ACM</pub><doi>10.1145/3439769</doi><tpages>45</tpages></addata></record>
fulltext fulltext
identifier ISSN: 1049-331X
ispartof ACM transactions on software engineering and methodology, 2021-05, Vol.30 (3), p.1-45, Article 31
issn 1049-331X
1557-7392
language eng
recordid cdi_crossref_primary_10_1145_3439769
source ACM Digital Library Complete
subjects Documentation
Search-based software engineering
Software and its engineering
Software creation and management
Software post-development issues
title Automatic API Usage Scenario Documentation from Technical Q&A Sites
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-28T23%3A09%3A23IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-acm_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Automatic%20API%20Usage%20Scenario%20Documentation%20from%20Technical%20Q&A%20Sites&rft.jtitle=ACM%20transactions%20on%20software%20engineering%20and%20methodology&rft.au=Uddin,%20Gias&rft.date=2021-05-01&rft.volume=30&rft.issue=3&rft.spage=1&rft.epage=45&rft.pages=1-45&rft.artnum=31&rft.issn=1049-331X&rft.eissn=1557-7392&rft_id=info:doi/10.1145/3439769&rft_dat=%3Cacm_cross%3E3439769%3C/acm_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true