Gistable: Evaluating the Executability of Python Code Snippets on GitHub

08/14/2018
by   Eric Horton, et al.
0

Software developers create and share code online to demonstrate programming language concepts and programming tasks. Code snippets can be a useful way to explain and demonstrate a programming concept, but may not always be directly executable. A code snippet can contain parse errors, or fail to execute if the environment contains unmet dependencies. This paper presents an empirical analysis of the executable status of Python code snippets shared through the GitHub gist system, and the ability of developers familiar with software configuration to correctly configure and run them. We find that 75.6 missing dependencies, configuration files, reliance on a specific operating system, or some other environment configuration. Our study also suggests the natural assumption developers make about resource names when resolving configuration errors is correct less than half the time. We also present Gistable, a database and extensible framework built on GitHub's gist system, which provides executable code snippets to enable reproducible studies in software engineering. Gistable contains 10,259 code snippets, approximately 5,000 with a Dockerfile to configure and execute them without import error. Gistable is publicly available at https://github.com/gistable/gistable.

READ FULL TEXT
research
05/27/2019

DockerizeMe: Automatic Inference of Environment Dependencies for Python Code Snippets

Platforms like Stack Overflow and GitHub's gist system promote the shari...
research
10/17/2022

System-Specific Interpreters Make Megasystems Friendlier

Modern operating systems, browsers, and office suites have become megasy...
research
08/02/2021

DepRes: A Tool for Resolving Fully Qualified Names and Their Dependencies

Reusing code snippets shared by other programmers on Q A forums (e.g.,...
research
09/13/2019

V2: Fast Detection of Configuration Drift in Python

Code snippets are prevalent, but are hard to reuse because they often la...
research
12/09/2021

Projecting Robot Navigation Paths: Hardware and Software for Projected AR

For mobile robots, mobile manipulators, and autonomous vehicles to safel...
research
05/14/2018

Functional Baby Talk: Analysis of Code Fragments from Novice Haskell Programmers

What kinds of mistakes are made by novice Haskell developers, as they le...
research
07/31/2018

Sourcerer's Apprentice and the study of code snippet migration

On the worldwide web, not only are webpages connected but source code is...

Please sign up or login with your details

Forgot password? Click here to reset