• Aucun résultat trouvé

Mining Repair Actions for Automated Program Fixing

N/A
N/A
Protected

Academic year: 2021

Partager "Mining Repair Actions for Automated Program Fixing"

Copied!
2
0
0

Texte intégral

(1)

HAL Id: hal-00696590

https://hal.inria.fr/hal-00696590

Submitted on 14 May 2012

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Mining Repair Actions for Automated Program Fixing

Matias Martinez, Martin Monperrus

To cite this version:

Matias Martinez, Martin Monperrus. Mining Repair Actions for Automated Program Fixing. Con- férence GDR-GPL-CIEL, Jun 2012, Rennes, France, France. �hal-00696590�

(2)

Analyzed 14 open-source Java projects repositories: 89993 versioning transactions, 1377337 repair actions.

Mining Repair Actions for Automated Program Fixing

Matías Martínez, Martin Monperrus

We mine repair actions written by developers from bug-fix in software repositories (e.g. CVS, SVN or Git).

MCRepair uses the mined data to predict an unordered tuple of repairs actions and also counts the number of attempts needed to predict the correct repair.

Overview

Methodology

Evaluation Future work

 Coupling MCRepair with fault localization approaches to reduce the time to find correct repairs

 Instantiating repairs actions to produce more precise repairs

 Predict higher order repair actions: co-occurring repair actions

Repair actions are a kind of modification on source code that is made to fix a bug.

Automated program fixing consists of generating repair actions in order to fix bugs in an automated manner.

Objective

We present MCRepair, an automatic software repair process that minimizes the repair time.

Context

Repair models are sets of semantic repair actions We define two repair models:

 Coarse-grain: 48 repairs actions.

E.g. Statement_Insert

 Fine-grain: 186 repairs action. E.g.

Condition_Expression_Changes_of_If_Statement

Mining transaction to get probabilities from repair actions based on the intuition: Different definitions of “bug-fix transactions” yield different topologies for repair models.

MCRepair uses the probability distribution of repair actions from software repositories to maximize the likelihood of finding a correct repair action.

Heuristics to select transaction bags T representative of software repair are based on:

Commit text: contains words fix, bug, path (BFP).

Syntactic features: T with N lines changes (N-LC).

Semantic features: T with N semantic source code change (N-SC).

Small transactions are very likely to only contain a bug-fix and unlikely to contain a new feature.

Repair Model Heuristic to select bug-fix transaction bag

Mining

transactions MCRepair

Repair size

Correct repair

Nr. of attempts Prob.dist.

repair actions

Computed the median time required to find the correct repair of fix transactions for both repair model. MCRepair was fed with 6 heuristics.

Coarse grains: bug-fix with 6 repair action < 2000 attempts and with 1 between 3 and 8.

Fine-grain: bug-fix with 3 repair action < 22000 attempts, and with 1 between 3 and 16.

Median time required to find the correct coarse-grain repairs All

1-SC 1-LC

BFP 20-SC

20-LC

Best heuristic to fed MCRepair

where cov(repairActioni) = percentage of transactions which include at least one repairActioni cov(repairActioni)

cov(repairActionj)

j

prob(repairActioni) =

Repair Size (in Semantic Source Code Changes)

Median # Repair Attempts

Références

Documents relatifs

This can be useful, for example to build a catalogue of possible repair actions [8]. To identify what commits contain bug fixes, two methods can be used, one consists in searching

In this part, our methodology consisted of a review of the lit- erature on project success predicted by data mining, exper- iments with more than 10 project metrics on 50 real

2) Skewness of Probability Distributions: Figure 2 shows the probability for the most frequent repair actions of repair model CTET according to the transaction size (in number of

Our results show that the risk of epidemic onset of cholera in a given area and the initial intensity of local outbreaks could have been anticipated during the early days of the

Learning-based repair approaches explore the advanced machine learning technique, especially deep learning technique, to boosting program repair [ 129 ]. The availability of

Because FixMiner considers code hunks as the unit for building Rich Edit Scripts, a given pattern may represent a repeating context (i.e., Shape pat- tern) or change (i.e., Action

When the method has no parameter, Args ← ∅. Given a buggy method, we consider all methods with similar method signatures as candidates for fix ingredients. In practice, we consider

• Connecting Program Synthesis and Reachability: Automatic Program Re- pair Using Test-Input Generation (2017) [134] creates a meta-program parametrized with parameters, encoding