Exempla Gratis (E.G.): Code Examples for Free

11/03/2020
by   Celeste Barnaby, et al.
0

Modern software engineering often involves using many existing APIs, both open source and, in industrial coding environments, proprietary. Programmers reference documentation and code search tools to remind themselves of proper common usage patterns of APIs. However, high-quality API usage examples are computationally expensive to curate and maintain, and API usage examples retrieved from company-wide code search can be tedious to review. We present a tool, EG, that mines codebases and shows the common, idiomatic usage examples for API methods. EG was integrated into Facebook's internal code search tool for the Hack language and evaluated on open-source GitHub projects written in Python. EG was also compared against code search results and hand-written examples from a popular programming website called ProgramCreek. Compared with these two baselines, examples generated by EG are more succinct and representative with less extraneous statements. In addition, a survey with Facebook developers shows that EG examples are preferred in 97 percent of cases.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/30/2022

Mining unit test cases to synthesize API usage examples

Software developers study and reuse existing source code to understand h...
research
03/22/2021

Comprehensive Integration of API Usage Patterns

Nowadays, developers often reuse existing APIs to implement their progra...
research
01/06/2017

Online characterization of planetary surfaces: PlanetServer, an open-source analysis and visualization tool

The lack of open-source tools for hyperspectral data visualization and a...
research
12/04/2018

Aroma: Code Recommendation via Structural Code Search

Programmers often write code which have similarity to existing code writ...
research
06/12/2020

Task-Oriented API Usage Examples Prompting Powered By Programming Task Knowledge Graph

Programming tutorials are often created to demonstrate programming tasks...
research
09/05/2020

Teddy: Automatic Recommendation of Pythonic Idiom Usage For Pull-Based Software Projects

Pythonic code is idiomatic code that follows guiding principles and prac...
research
02/17/2022

QuerTCI: A Tool Integrating GitHub Issue Querying with Comment Classification

Issue tracking systems enable users and developers to comment on problem...

Please sign up or login with your details

Forgot password? Click here to reset