Skip to content

scc-fixie/fix-patterns

Repository files navigation

Expanding Fix Patterns to Enable Automatic Program Repair

Replication package for the research paper accepted at The 32nd International Symposium on Software Reliability Engineering (ISSRE 2021).

I. Requirements

II. Description

Our tool automatically generates fix patterns out of similar fixes and compares the generated fix patterns against a state-of-the-art taxonomy. Our tool splits fixes into smaller, method-level chunks and calculates their similarity. A threshold-based clustering algorithm groups similar chunks, generates fix patterns and finds matches with the state-of-the-art taxonomy. We thematically analyse non-matching clusters and observe new fix patterns that expand the existing taxonomy.

The dataset we use in our evaluation is Defects4J and the taxonomy of fix patterns is a collection of fix patterns from the APR literature found in TBar.

III. Prepare Defects4J Bugs

  1. Download and install Defects4J.

./installD4J.sh

  1. Check out bugs and fixes.

./checkoutD4JBugs.sh

These two scripts are adapted from TBar.

If you fail to install Defects4J or checkout Defects4J bugs, please check instructions.

IV. TBar fix patterns

TBar is a template-based automated program repair tool that applies fix patterns from a taxonomy collected form the APR literature.

For more details about the taxonomy of fix patterns and the TBar tool, please see publication.

For more details about how we automatically match our fix patterns with TBar fix patterns in our evaluation, please see TBar fix patterns.

V. Generate fix patterns

java -jar fixPatterns.jar <path_to_Defects4J_bugs_and_fixes>

VI. Matching fix patterns

./matchClusters.sh

VII. Structure of the Directories

 |--- README.md               :  user guidance
 |--- TBar.md                 :  TBar fix patters
 |--- MatchingFPs             :  matching fix patterns
 |--- UnigramFPs              :  fix patterns generated with unigrams
 |--- NewFPs                  :  new fix patterns
 |--- installD4J.sh           :  a script to install Defects4J
 |--- checkoutD4JBugs.sh      :  a script to checkout Defects4J bugs and fixes


About

Fix patterns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages