34 research outputs found
MintHint: Automated Synthesis of Repair Hints
Being able to automatically repair programs is an extremely challenging task.
In this paper, we present MintHint, a novel technique for program repair that
is a departure from most of today's approaches. Instead of trying to fully
automate program repair, which is often an unachievable goal, MintHint performs
statistical correlation analysis to identify expressions that are likely to
occur in the repaired code and generates, using pattern-matching based
synthesis, repair hints from these expressions. Intuitively, these hints
suggest how to rectify a faulty statement and help developers find a complete,
actual repair. MintHint can address a variety of common faults, including
incorrect, spurious, and missing expressions.
We present a user study that shows that developers' productivity can improve
manyfold with the use of repair hints generated by MintHint -- compared to
having only traditional fault localization information. We also apply MintHint
to several faults of a widely used Unix utility program to further assess the
effectiveness of the approach. Our results show that MintHint performs well
even in situations where (1) the repair space searched does not contain the
exact repair, and (2) the operational specification obtained from the test
cases for repair is incomplete or even imprecise
Exploring Fitness and Edit Distance of Mutated Python Programs
Genetic Improvement (GI) is the process of using computational search techniques to improve existing software e.g. in terms of execution time, power consumption or correctness. As in most heuristic search algorithms, the search is guided by fitness with GI searching the space of program variants of the original software. The relationship between the program space and fitness is seldom simple and often quite difficult to analyse. This paper makes a preliminary analysis of GI’s fitness distance measure on program repair with three small Python programs. Each program undergoes incremental mutations while the change in fitness as measured by proportion of tests passed is monitored. We conclude that the fitnesses of these programs often does not change with single mutations and we also confirm the inherent discreteness of bug fixing fitness functions. Although our findings cannot be assumed to be general for other software they provide us with interesting directions for further investigation
LNCS
We present a formal framework for repairing infinite-state, imperative, sequential programs, with (possibly recursive) procedures and multiple assertions; the framework can generate repaired programs by modifying the original erroneous program in multiple program locations, and can ensure the readability of the repaired program using user-defined expression templates; the framework also generates a set of inductive assertions that serve as a proof of correctness of the repaired program. As a step toward integrating programmer intent and intuition in automated program repair, we present a cost-aware formulation - given a cost function associated with permissible statement modifications, the goal is to ensure that the total program modification cost does not exceed a given repair budget. As part of our predicate abstractionbased solution framework, we present a sound and complete algorithm for repair of Boolean programs. We have developed a prototype tool based on SMT solving and used it successfully to repair diverse errors in benchmark C programs
On search based software evolution
Abstract Writing software is a difficult and expensive task. It
FixEval: Execution-based Evaluation of Program Fixes for Programming Problems
The increasing complexity of software has led to a drastic rise in time and
costs for identifying and fixing bugs. Various approaches are explored in the
literature to generate fixes for buggy code automatically. However, few tools
and datasets are available to evaluate model-generated fixes effectively due to
the large combinatorial space of possible fixes for a particular bug. In this
work, we introduce FIXEVAL, a benchmark comprising buggy code submissions to
competitive programming problems and their respective fixes. FIXEVAL is
composed of a rich test suite to evaluate and assess the correctness of
model-generated program fixes and further information regarding time and memory
constraints and acceptance based on a verdict. We consider two Transformer
language models pretrained on programming languages as our baselines and
compare them using match-based and execution-based evaluation metrics. Our
experiments show that match-based metrics do not reflect model-generated
program fixes accurately. At the same time, execution-based methods evaluate
programs through all cases and scenarios designed explicitly for that solution.
Therefore, we believe FIXEVAL provides a step towards real-world automatic bug
fixing and model-generated code evaluation. The dataset and models are
open-sourced.\footnote{\url{https://github.com/mahimanzum/FixEval}
Would you fix this code for me? Effects of repair source and commenting on trust in code repair
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. Automation and autonomous systems are quickly becoming a more engrained aspect of modern society. The need for effective, secure computer code in a timely manner has led to the creation of automated code repair techniques to resolve issues quickly. However, the research to date has largely ignored the human factors aspects of automated code repair. The current study explored trust perceptions, reuse intentions, and trust intentions in code repair with human generated patches versus automated code repair patches. In addition, comments in the headers were manipulated to determine the effect of the presence or absence of comments in the header of the code. Participants were 51 programmers with at least 3 years’ experience and knowledge of the C programming language. Results indicated only repair source (human vs. automated code repair) had a significant influence on trust perceptions and trust intentions. Specifically, participants consistently reported higher levels of perceived trustworthiness, intentions to reuse, and trust intentions for human referents compared to automated code repair. No significant effects were found for comments in the headers
Automated Misconfiguration Repair of Configurable Cyber-Physical Systems with Search: an Industrial Case Study on Elevator Dispatching Algorithms
Real-world Cyber-Physical Systems (CPSs) are usually configurable. Through
parameters, it is possible to configure, select or unselect different system
functionalities. While this provides high flexibility, it also becomes a source
for failures due to misconfigurations. The large number of parameters these
systems have and the long test execution time in this context due to the use of
simulation-based testing make the manual repair process a cumbersome activity.
Subsequently, in this context, automated repairing methods are paramount. In
this paper, we propose an approach to automatically repair CPSs'
misconfigurations. Our approach is evaluated with an industrial CPS case study
from the elevation domain. Experiments with a real building and data obtained
from operation suggests that our approach outperforms a baseline algorithm as
well as the state of the practice (i.e., manual repair carried out by domain
experts).Comment: To be published in the 45th International Conference on Software
Engineering, SEIP trac