TruX-DTF / iFixR

Bug Report driven Program Repair
MIT License
17 stars 4 forks source link
bug-report program-repair

DOI

IFixR

IFixR a patch generation system for user-reported bugs, described in "iFixR: Bug Report driven Program Repair", In Foundations of Software Engineering, 2019.

@inproceedings{arXiv-1907.05620,
 title = {iFixR: Bug Report driven Program Repair},
 author = {Anil Koyuncu and Kui Liu and Tegawendé F. Bissyandé and Dongsun Kim and Martin Monperrus and Jacques Klein and Yves Le Traon},
 booktitle = {Proceedings of the 27th ACM Joint Meeting on European Software
  Engineering Conference and Symposium on the Foundations of Software
  Engineering},
 year = {2019},
 doi = {10.1145/3338906.3338935},
 url = {http://arxiv.org/pdf/1907.05620},
}

The workflow of this technique.\label{workflow}

II. Environment

Manual installation

Before running

Docker

III. How to run

Running Options

IFixR needs three input options for running.

  Usage: bash startPy.sh $1 $2 $3
  where $1 is root
        $2 is job
        $3 is subject

Data Viewer

The data provided with replication package is listed in directory 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

IV. Evaluation Result

APR tool Lang Math Total
jGenProg 0/0 5/18 5/18
jKali 0/0 1/14 1/14
jMutRepair 0/1 2/11 2/12
HDRepair 2/6 4/7 6/13
Nopol 3/7 1/21 4/28
ACS 3/4 12/16 15/20
ELIXIR 8/12 12/19 20/31
JAID 1/8 1/8 2/16
ssFix 5/12 10/26 15/38
CapGen 5/5 12/16 17/21
SketchFix 3/4 7/8 10/12
FixMiner 2/3 12/14 14/17
LSRepair 8/14 7/14 15/28
SimFix 9/13 14/26 23/39
kPAR 1/8 7/18 8/26
AVATAR 5/11 6/13 11/24
MIMIC_opt 11/19 10/25 21/44
MIMIC_all 6/11 7/16 13/27
MIMIC_top5 3/7 5/6 8/13

V. Generated Patches

MIMIC generates genuine/ plausible patches for 21/44 Defects4J bugs with its IR-based bug localizer.

Patches Genuineness
Lang_6 Correct
Lang_7 Correct
Lang_10 Correct
Lang_13 Plausible
Lang_18 Plausible
Lang_21 Plausible
Lang_22 Correct
Lang_24 Correct
Lang_26 Correct
Lang_33 Correct
Lang_39 Correct
Lang_43 Plausible
Lang_44 Plausible
Lang_45 Plausible
Lang_47 Correct
Lang_57 Correct
Lang_58 Plausible
Lang_59 Correct
Lang_63 Plausible
Math_2 Plausible
Math_5 Correct
Math_8 Plausible
Math_11 Correct
Math_15 Correct
Math_20 Plausible
Math_28 Plausible
Math_32 Plausible
Math_34 Correct
Math_35 Correct
Math_42 Plausible
Math_52 Plausible
Math_57 Correct
Math_58 Plausible
Math_59 Correct
Math_63 Plausible
Math_64 Plausible
Math_65 Correct
Math_70 Correct
Math_75 Correct
Math_82 Plausible
Math_95 Plausible
Math_96 Plausible
Math_97 Plausible
Math_104 Plausible

VI. Structure of the project

  |--- README.md                    :  user guidance
  |--- code                         :  code
  |--- data                         :  replication data
  |--- doc                          :  document
  |--- OUTPUT/MIMIC/FixedBugs       :  generated patches