Loading…
APIzation: Generating Reusable APIs from StackOverflow Code Snippets
Developer forums like StackOverflow have become essential resources to modern software development practices. However, many code snippets lack a well-defined method declaration, and thus they are often incomplete for immediate reuse. Developers must adapt the retrieved code snippets by parameterizin...
Saved in:
Published in: | arXiv.org 2021-09 |
---|---|
Main Authors: | , |
Format: | Article |
Language: | English |
Subjects: | |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
cited_by | |
---|---|
cites | |
container_end_page | |
container_issue | |
container_start_page | |
container_title | arXiv.org |
container_volume | |
creator | Terragni, Valerio Salza, Pasquale |
description | Developer forums like StackOverflow have become essential resources to modern software development practices. However, many code snippets lack a well-defined method declaration, and thus they are often incomplete for immediate reuse. Developers must adapt the retrieved code snippets by parameterizing the variables involved and identifying the return value. This activity, which we call APIzation of a code snippet, can be tedious and time-consuming. In this paper, we present APIzator to perform APIzations of Java code snippets automatically. APIzator is grounded by four common patterns that we extracted by studying real APIzations in GitHub. APIzator presents a static analysis algorithm that automatically extracts the method parameters and return statements. We evaluated APIzator with a ground-truth of 200 APIzations collected from 20 developers. For 113 (56.50 %) and 115 (57.50 %) APIzations, APIzator and the developers extracted identical parameters and return statements, respectively. For 163 (81.50 %) APIzations, either the parameters or the return statements were identical. |
format | article |
fullrecord | <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_2568814505</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2568814505</sourcerecordid><originalsourceid>FETCH-proquest_journals_25688145053</originalsourceid><addsrcrecordid>eNqNiksKwjAUAIMgWLR3CLgupElTgzup35Vi3Zeor9Jak5qXKnh6u_AArmZgZkACLkQcqYTzEQkRa8YYT2dcShGQ5eKw-2hfWTOnGzDgejc3eoQO9bkB2mekpbMPmnt9ue9f4MrGvmlmr0BzU7UteJyQYakbhPDHMZmuV6dsG7XOPjtAX9S2c6ZPBZepUnEimRT_XV_pbTn9</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2568814505</pqid></control><display><type>article</type><title>APIzation: Generating Reusable APIs from StackOverflow Code Snippets</title><source>Publicly Available Content Database (Proquest) (PQ_SDU_P3)</source><creator>Terragni, Valerio ; Salza, Pasquale</creator><creatorcontrib>Terragni, Valerio ; Salza, Pasquale</creatorcontrib><description>Developer forums like StackOverflow have become essential resources to modern software development practices. However, many code snippets lack a well-defined method declaration, and thus they are often incomplete for immediate reuse. Developers must adapt the retrieved code snippets by parameterizing the variables involved and identifying the return value. This activity, which we call APIzation of a code snippet, can be tedious and time-consuming. In this paper, we present APIzator to perform APIzations of Java code snippets automatically. APIzator is grounded by four common patterns that we extracted by studying real APIzations in GitHub. APIzator presents a static analysis algorithm that automatically extracts the method parameters and return statements. We evaluated APIzator with a ground-truth of 200 APIzations collected from 20 developers. For 113 (56.50 %) and 115 (57.50 %) APIzations, APIzator and the developers extracted identical parameters and return statements, respectively. For 163 (81.50 %) APIzations, either the parameters or the return statements were identical.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Algorithms ; Parameters ; Software development</subject><ispartof>arXiv.org, 2021-09</ispartof><rights>2021. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktohtml>$$Uhttps://www.proquest.com/docview/2568814505?pq-origsite=primo$$EHTML$$P50$$Gproquest$$Hfree_for_read</linktohtml><link.rule.ids>780,784,25753,37012,44590</link.rule.ids></links><search><creatorcontrib>Terragni, Valerio</creatorcontrib><creatorcontrib>Salza, Pasquale</creatorcontrib><title>APIzation: Generating Reusable APIs from StackOverflow Code Snippets</title><title>arXiv.org</title><description>Developer forums like StackOverflow have become essential resources to modern software development practices. However, many code snippets lack a well-defined method declaration, and thus they are often incomplete for immediate reuse. Developers must adapt the retrieved code snippets by parameterizing the variables involved and identifying the return value. This activity, which we call APIzation of a code snippet, can be tedious and time-consuming. In this paper, we present APIzator to perform APIzations of Java code snippets automatically. APIzator is grounded by four common patterns that we extracted by studying real APIzations in GitHub. APIzator presents a static analysis algorithm that automatically extracts the method parameters and return statements. We evaluated APIzator with a ground-truth of 200 APIzations collected from 20 developers. For 113 (56.50 %) and 115 (57.50 %) APIzations, APIzator and the developers extracted identical parameters and return statements, respectively. For 163 (81.50 %) APIzations, either the parameters or the return statements were identical.</description><subject>Algorithms</subject><subject>Parameters</subject><subject>Software development</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2021</creationdate><recordtype>article</recordtype><sourceid>PIMPY</sourceid><recordid>eNqNiksKwjAUAIMgWLR3CLgupElTgzup35Vi3Zeor9Jak5qXKnh6u_AArmZgZkACLkQcqYTzEQkRa8YYT2dcShGQ5eKw-2hfWTOnGzDgejc3eoQO9bkB2mekpbMPmnt9ue9f4MrGvmlmr0BzU7UteJyQYakbhPDHMZmuV6dsG7XOPjtAX9S2c6ZPBZepUnEimRT_XV_pbTn9</recordid><startdate>20210902</startdate><enddate>20210902</enddate><creator>Terragni, Valerio</creator><creator>Salza, Pasquale</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope></search><sort><creationdate>20210902</creationdate><title>APIzation: Generating Reusable APIs from StackOverflow Code Snippets</title><author>Terragni, Valerio ; Salza, Pasquale</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_25688145053</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2021</creationdate><topic>Algorithms</topic><topic>Parameters</topic><topic>Software development</topic><toplevel>online_resources</toplevel><creatorcontrib>Terragni, Valerio</creatorcontrib><creatorcontrib>Salza, Pasquale</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science & Engineering Collection</collection><collection>ProQuest Central (Alumni)</collection><collection>ProQuest Central</collection><collection>ProQuest Central Essentials</collection><collection>AUTh Library subscriptions: ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central</collection><collection>SciTech Premium Collection (Proquest) (PQ_SDU_P3)</collection><collection>ProQuest Engineering Collection</collection><collection>ProQuest Engineering Database</collection><collection>Publicly Available Content Database (Proquest) (PQ_SDU_P3)</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Terragni, Valerio</au><au>Salza, Pasquale</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>APIzation: Generating Reusable APIs from StackOverflow Code Snippets</atitle><jtitle>arXiv.org</jtitle><date>2021-09-02</date><risdate>2021</risdate><eissn>2331-8422</eissn><abstract>Developer forums like StackOverflow have become essential resources to modern software development practices. However, many code snippets lack a well-defined method declaration, and thus they are often incomplete for immediate reuse. Developers must adapt the retrieved code snippets by parameterizing the variables involved and identifying the return value. This activity, which we call APIzation of a code snippet, can be tedious and time-consuming. In this paper, we present APIzator to perform APIzations of Java code snippets automatically. APIzator is grounded by four common patterns that we extracted by studying real APIzations in GitHub. APIzator presents a static analysis algorithm that automatically extracts the method parameters and return statements. We evaluated APIzator with a ground-truth of 200 APIzations collected from 20 developers. For 113 (56.50 %) and 115 (57.50 %) APIzations, APIzator and the developers extracted identical parameters and return statements, respectively. For 163 (81.50 %) APIzations, either the parameters or the return statements were identical.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | EISSN: 2331-8422 |
ispartof | arXiv.org, 2021-09 |
issn | 2331-8422 |
language | eng |
recordid | cdi_proquest_journals_2568814505 |
source | Publicly Available Content Database (Proquest) (PQ_SDU_P3) |
subjects | Algorithms Parameters Software development |
title | APIzation: Generating Reusable APIs from StackOverflow Code Snippets |
url | http://sfxeu10.hosted.exlibrisgroup.com/loughborough?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-07T18%3A12%3A11IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=document&rft.atitle=APIzation:%20Generating%20Reusable%20APIs%20from%20StackOverflow%20Code%20Snippets&rft.jtitle=arXiv.org&rft.au=Terragni,%20Valerio&rft.date=2021-09-02&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E2568814505%3C/proquest%3E%3Cgrp_id%3Ecdi_FETCH-proquest_journals_25688145053%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_pqid=2568814505&rft_id=info:pmid/&rfr_iscdi=true |