[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1109/ICSE-Companion52605.2021.00039acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

COSTER: a tool for finding fully qualified names of API elements in online code snippets

Published: 29 November 2021 Publication History

Abstract

Code snippets available on question answering sites (e.g., Stack Overflow) are a great source of information for learning how to use APIs. However, it is difficult to determine which APIs are discussed in those code snippets because they often suffer from declaration ambiguities and missing external references. In this paper, we introduce COSTER, a context-sensitive type solver that can determine the fully qualified names (FQNs) of API elements in those code snippets. The tool uses three different similarity measures to rank potential FQNs of a query API element. Results from our quantitative evaluation and user study demonstrate that the proposed tool can not only recommend FQNs of API elements with great accuracy but can also help developers to reuse online code snippets by suggesting the required import statements.
Website: https://khaledkucse.github.io/COSTER/
Demo Video: https://youtu.be/oDZtw9MzUWM

References

[1]
S. Subramanian, L. Inozemtseva, and R. Holmes, "Live api documentation," in Proc. of the 36th International Conference on Software Engineering, 2014, pp. 643--652.
[2]
M. Ahasanuzzaman, M. Asaduzzaman, and C. K. Roy, "CAPS: a supervised technique for classifying Stack Overflow posts concerning API issues," Empirical Software Engineering, vol. 25, pp. 1493--1532, 2020.
[3]
C. K. Saifullah, M. Asaduzzaman, and C. K. Roy, "Learning from examples to find fully qualified names of api elements in code snippets," in Proc. of the 34th International Conference on Automated Software Engineering, 2019, pp. 243--254.
[4]
C. Sun, D. Lo, S.-C. Khoo, and J. Jiang, "Towards more accurate retrieval of duplicate bug reports," in Proc. of the 26th International Conference on Automated Software Engineering, 2011, pp. 253--262.
[5]
H. Phan, H. Nguyen, N. Tran, L. Truong, A. Nguyen, and T. Nguyen, "Statistical learning of api fully qualified names in code snippets of online forums," in Proc. of the 40th International Conference on Software Engineering, 2018, pp. 632--642.
[6]
B. Dagenais and L. Hendren, "Enabling static analysis for partial java programs," in Proc. of the 23rd International Conference on Objectoriented Programming Systems Languages and Applications, vol. 43, no. 10, 2008, pp. 313--328.

Cited By

View all
  • (2023)The CodeSparks Framework – Augmenting Source Code with Glyph-based VisualizationsScience of Computer Programming10.1016/j.scico.2023.102998230:COnline publication date: 1-Aug-2023

Index Terms

  1. COSTER: a tool for finding fully qualified names of API elements in online code snippets
        Index terms have been assigned to the content through auto-classification.

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image ACM Conferences
        ICSE '21: Proceedings of the 43rd International Conference on Software Engineering: Companion Proceedings
        May 2021
        373 pages

        Sponsors

        In-Cooperation

        • IEEE CS

        Publisher

        IEEE Press

        Publication History

        Published: 29 November 2021

        Check for updates

        Author Tags

        1. API usages
        2. code examples
        3. fully qualified name
        4. type inference
        5. type resolution

        Qualifiers

        • Research-article

        Conference

        ICSE '21
        Sponsor:

        Acceptance Rates

        Overall Acceptance Rate 276 of 1,856 submissions, 15%

        Upcoming Conference

        ICSE 2025

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)2
        • Downloads (Last 6 weeks)0
        Reflects downloads up to 29 Jan 2025

        Other Metrics

        Citations

        Cited By

        View all
        • (2023)The CodeSparks Framework – Augmenting Source Code with Glyph-based VisualizationsScience of Computer Programming10.1016/j.scico.2023.102998230:COnline publication date: 1-Aug-2023

        View Options

        Login options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Figures

        Tables

        Media

        Share

        Share

        Share this Publication link

        Share on social media