V2: Fast Detection of Configuration Drift in Python

09/13/2019
by   Eric Horton, et al.
0

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. 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.

READ FULL TEXT
research
01/16/2018

Why and How Java Developers Break APIs

Modern software development depends on APIs to reuse code and increase p...
research
08/14/2018

Gistable: Evaluating the Executability of Python Code Snippets on GitHub

Software developers create and share code online to demonstrate programm...
research
03/24/2023

Automated Identification of Performance Changes at Code Level

To develop software with optimal performance, even small performance cha...
research
10/30/2017

Monotonicity and robustness in Wiener disorder detection

We study the problem of detecting a drift change of a Brownian motion un...
research
01/11/2023

I depended on you and you broke me: An empirical study of manifesting breaking changes in client packages

Complex software systems have a network of dependencies. Developers ofte...
research
03/28/2022

Two-Dimensional Drift Analysis: Optimizing Two Functions Simultaneously Can Be Hard

In this paper we show how to use drift analysis in the case of two rando...

Please sign up or login with your details

Forgot password? Click here to reset