12,637 research outputs found
Coming: a Tool for Mining Change Pattern Instances from Git Commits
Software repositories such as Git have become a relevant source of
information for software engineer researcher. For instance, the detection of
Commits that fulfill a given criterion (e.g., bugfixing commits) is one of the
most frequent tasks done to understand the software evolution. However, to our
knowledge, there is not open-source tools that, given a Git repository, returns
all the instances of a given change pattern. In this paper we present Coming, a
tool that takes an input a Git repository and mines instances of change
patterns on each commit. For that, Coming computes fine-grained changes between
two consecutive revisions, analyzes those changes to detect if they correspond
to an instance of a change pattern (specified by the user using XML), and
finally, after analyzing all the commits, it presents a) the frequency of code
changes and b) the instances found on each commit. We evaluate Coming on a set
of 28 pairs of revisions from Defects4J, finding instances of change patterns
that involve If conditions on 26 of them
FixMiner: Mining Relevant Fix Patterns for Automated Program Repair
Patching is a common activity in software development. It is generally
performed on a source code base to address bugs or add new functionalities. In
this context, given the recurrence of bugs across projects, the associated
similar patches can be leveraged to extract generic fix actions. While the
literature includes various approaches leveraging similarity among patches to
guide program repair, these approaches often do not yield fix patterns that are
tractable and reusable as actionable input to APR systems. In this paper, we
propose a systematic and automated approach to mining relevant and actionable
fix patterns based on an iterative clustering strategy applied to atomic
changes within patches. The goal of FixMiner is thus to infer separate and
reusable fix patterns that can be leveraged in other patch generation systems.
Our technique, FixMiner, leverages Rich Edit Script which is a specialized tree
structure of the edit scripts that captures the AST-level context of the code
changes. FixMiner uses different tree representations of Rich Edit Scripts for
each round of clustering to identify similar changes. These are abstract syntax
trees, edit actions trees, and code context trees. We have evaluated FixMiner
on thousands of software patches collected from open source projects.
Preliminary results show that we are able to mine accurate patterns,
efficiently exploiting change information in Rich Edit Scripts. We further
integrated the mined patterns to an automated program repair prototype,
PARFixMiner, with which we are able to correctly fix 26 bugs of the Defects4J
benchmark. Beyond this quantitative performance, we show that the mined fix
patterns are sufficiently relevant to produce patches with a high probability
of correctness: 81% of PARFixMiner's generated plausible patches are correct.Comment: 31 pages, 11 figure
The Impact of Systematic Edits in History Slicing
While extracting a subset of a commit history, specifying the necessary
portion is a time-consuming task for developers. Several commit-based history
slicing techniques have been proposed to identify dependencies between commits
and to extract a related set of commits using a specific commit as a slicing
criterion. However, the resulting subset of commits become large if commits for
systematic edits whose changes do not depend on each other exist. We
empirically investigated the impact of systematic edits on history slicing. In
this study, commits in which systematic edits were detected are split between
each file so that unnecessary dependencies between commits are eliminated. In
several histories of open source systems, the size of history slices was
reduced by 13.3-57.2% on average after splitting the commits for systematic
edits.Comment: 5 pages, MSR 201
A Data Set of Generalizable Python Code Change Patterns
Mining repetitive code changes from version control history is a common way
of discovering unknown change patterns. Such change patterns can be used in
code recommender systems or automated program repair techniques. While there
are such tools and datasets exist for Java, there is little work on finding and
recommending such changes in Python. In this paper, we present a data set of
manually vetted generalizable Python repetitive code change patterns. We create
a coding guideline to identify generalizable change patterns that can be used
in automated tooling. We leverage the mined change patterns from recent work
that mines repetitive changes in Python projects and use our coding guideline
to manually review the patterns. For each change, we also record a description
of the change and why it is applied along with other characteristics such as
the number of projects it occurs in. This review process allows us to identify
and share 72 Python change patterns that can be used to build and advance
Python developer support tools
- …