arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1808.04919cs.SE
收藏

Gistable:在GitHub上评估Python代码段的可执行性

Gistable: Evaluating the Executability of Python Code Snippets on GitHub

Eric Horton, Chris Parnin

摘要:

软件开发人员在线创建和共享代码,以演示程序设计语言概念和编程任务。代码段是解释和演示编程概念的有用方法,但可能并不总是直接可执行的。代码段可能包含分析错误,或者在环境包含未满足的依赖项时无法执行。本文对通过GitHub gist系统共享的Python代码片段的可执行状态以及熟悉软件配置的开发人员正确配置和运行它们的能力进行了实证分析。我们发现,75.6%的GIST需要非平凡的配置,以克服缺少的依赖关系,配置文件,依赖于特定的操作系统,或其他一些环境配置。我们的研究还表明,开发人员在解决配置错误时对资源名称的自然假设只有不到一半的正确率。我们还介绍了Gistable,一个建立在GitHub的gist系统上的数据库和可扩展框架,它提供了可执行的代码片段,以便在软件工程中进行可重复的研究。Gistable包含10,259个代码片段,其中大约5,000个带有Dockerfile,用于配置和执行它们而不会发生导入错误。Gistable可在https://github.com/gistable/gistable上公开获取。

英文摘要:

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% of gists require non-trivial configuration to overcome 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑