2020-04-10 14:48:35 +02:00
2020-04-09 13:46:18 +02:00
2020-04-10 14:48:35 +02:00
2020-04-10 14:48:35 +02:00
2020-04-09 13:08:05 +02:00
2020-04-10 14:48:35 +02:00
2020-04-09 13:31:56 +02:00
2020-04-09 13:31:56 +02:00
2020-04-09 14:35:58 +02:00
2020-04-09 14:38:45 +02:00
2020-04-06 21:30:39 +02:00
2020-04-07 18:06:53 +02:00
2020-04-09 13:47:05 +02:00
2020-04-06 21:30:39 +02:00

FixMiner Build StatusCoverage StatusJava CI with Maven

Code of FixMiner

Reference: FixMiner: Mining Relevant Fix Patterns for Automated Program Repair (Empirical Software Engineering, doi:10.1007/s10664-019-09780-z)

FixMiner

I. Introduction

Fixminer is a systematic and automated approach to mine relevant and actionable fix patterns for automated program repair. The workflow of this technique.\label{workflow}

II. Environment setup

  • OS: macOS Mojave (10.14.3)

  • JDK8: (important!)

  • Download and configure Anaconda

  • Create an python environment using the environment file

    conda env create -f environment.yml
    
  • After creating the environment, activate it. It is containing necessary dependencies for redis, and python.

    source activate fixminerEnv
    
  • Update the config.yml file with the corresponding paths in your computer. An example config.yml file could be found under

    fixminer_source/src/main/resources/config.yml
    

IV. Step-by-Step execution

Before running

  • Update config file with corresponding user paths.

  • Active the conda environment from shell

    source activate fixminerEnv
    

In order to launch FixMiner, execute fixminer.sh

bash fixminer.sh [JOB] [CONFIG_FILE]
 e.g. bash fixminer.sh  dataset4c /Users/projects/release/fixminer_source/src/main/resources/config.yml

Job Types

FixMiner needs to specify a job to run.

  1. dataset4j / dataset4c: Create a java/c mining dataset from the projects listed in subjects.csv or datasets.csv for c

  2. richEditScript: Calls the jar file produced as the results as maven package to compute Rich edit scripts. This step can be invoke natively from java or using the Launcher with appropriate arguments.

    java -jar FixPatternMiner-1.0.0-jar-with-dependencies.jar  /Users/projects/release/fixminer_source/src/main/resources/config.yml RICHEDITSCRIPT
    
  3. shapeSI: Search index creation for shapes. The output of this step is written to pairs folder which will be generated under datapath in config file

  4. compare : Calls the jar file produced as the results as maven package to compare the trees. This step can be invoke natively from java or using the Launcher with appropriate arguments.

                     ```powershell
                     java -jar FixPatternMiner-1.0.0-jar-with-dependencies.jar  /Users/projects/release/fixminer_source/src/main/resources/config.yml COMPARE
    
                     ```     
    
  5. cluster : Forms clusters of identical trees. The output of this step is written to shapes folder which will be generated under datapath in config file

III. Replication Data

Replication Data:

singleBR.pickle

This pickle contains the list bug reports (i.e. bid) with the their corresponding fixes (i.e. commit) for each project in the dataset (i.e. project). 

bugReports.7z.00X

This is the dump of the bug reports archive extracted from each commit. These bug reports are not necessarily considered as BUG,CLOSED; this archive is the contins initial bug reports before identifying the fixes. 

gumInput.7z.001

This archive contains all the patches in our dataset, formatted in a way that can be processed by GumTree (i.e DiffEntries, prevFiles, revFiles)

ALLbugReportsComplete.pickle

The pickle object that represents the bug reports under the following columns 'bugReport', 'summary', 'description', 'created', 'updated', 'resolved', 'reporterDN', 'reporterEmail','hasAttachment', 'attachmentTime', 'hasPR', 'commentsCount'

Data Viewer

The data provided with replication package is listed in directory python/data The data is stored in different formats. (e.g. pickle, db, csv, etc..)

The see content of the .pickle file the following script could be used.

 import pickle as p
 import gzip
 def load_zipped_pickle(filename):
    with gzip.open(filename, 'rb') as f:
        loaded_object = p.load(f)
        return loaded_object

Usage

result = load_zipped_pickle('code/LANGbugReportsComplete.pickle')
# Result is pandas object which can be exported to several formats
# Details on how to export is listed in offical library documentation
# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html

S
Description
Mining Relevant Fix Patterns for Automated Program Repair
Readme 312 MiB
Languages
C 69.3%
Java 26.9%
Python 2.9%
GAP 0.5%
CSS 0.1%
Other 0.2%