V2: Fast Detection of Configuration Drift in Python

Eric Horton, Chris Parnin
9/13/2019
cs.SE

Official code: v2-project/v2 (5 stars, JavaScript, last commit 2020-07-27).

Abstract

Code snippets are prevalent, but are hard to reuse because they often lack an accompanying environment configuration. Most are not actively maintained, allowing for drift between the most recent possible configuration and the code snippet as the snippet becomes out-of-date over time.

Show full abstract

Recent work has identified the problem of validating and detecting out-of-date code snippets as the most important consideration for code reuse. However, determining if a snippet is correct, but simply out-of-date, is a non-trivial task. In the best case, breaking changes are well documented, allowing developers to manually determine when a code snippet contains an out-of-date API usage. In the worst case, determining if and when a breaking change was made requires an exhaustive search through previous dependency versions. We present V2, a strategy for determining if a code snippet is out-of-date by detecting discrete instances of configuration drift, where the snippet uses an API which has since undergone a breaking change. Each instance of configuration drift is classified by a failure encountered during validation and a configuration patch, consisting of dependency version changes, which fixes the underlying fault. V2 uses feedback-directed search to explore the possible configuration space for a code snippet, reducing the number of potential environment configurations that need to be validated. When run on a corpus of public Python snippets from prior research, V2 identifies 248 instances of configuration drift.

View on arXivView PDF

Code Implementations(1)

v2-project/v2Official100%

Fast Detection of Configuration Drift in Python

51JavaScript, PythonMay 7, 20196 years ago

Similar Papers

Cite this paper

@article{horton2019fast,
  title  = {V2: Fast Detection of Configuration Drift in Python},
  author = {Eric Horton and Chris Parnin},
  year   = {2019},
  eprint = {1909.06251},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.06251}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1909.06251.svg)](https://codeofpaper.com/paper/1909.06251)

Discussion