https://github.com/assert-kth/iter

ITER: Iterative Neural Repair for Multi-Location Patches, ICSE 2024, http://arxiv.org/pdf/2304.12015

https://github.com/assert-kth/iter

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

ITER: Iterative Neural Repair for Multi-Location Patches, ICSE 2024, http://arxiv.org/pdf/2304.12015

Basic Info
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 2
  • Open Issues: 1
  • Releases: 0
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

ITER: Iterative Neural Repair for Multi-Location Patches

ITER is a neural program repair system with an original training and inference loop enabling advanced multi-location patches. See the paper.

bibtex @inproceedings{2304.12015, title = {ITER: Iterative Neural Repair for Multi-Location Patches}, booktitle = {Proceedings of International Conference on Software Engineering}, year = {2024}, author = {He Ye and Martin Monperrus}, url = {http://arxiv.org/pdf/2304.12015}, }

Repo Structure

```bash repairiteration:in this folder, you will find all repair iterations of considered bugs The folder is structured as ** repairiteration/BugID/FLIteration/RankedSuspicious_Statement/Iterations **

gzoltar: in this folder, you will find the FL dependency used in ITER

GenerateIterativeSample.py: script to generate iterative training samples.

1localizefault.py: script to obtain ranked list of bug under repair

2bugrepresentation.py: script to prepare bug representation of the ranked FL

3_repair.py: script to iterative repair

4tracepatches.py: script to trace plausible patches over iterations, this script generates patches.csv

ITERFL.py: script to be called by 3repair.py to re-execute FL.

utils/context.jar: tool to obtain the context of bug under repair, called by 2bugrepresentation.py

rungzoltarfl.sh: script to execute gzoltar, used by 1localizefault.py

patches.csv: all plausible patches.

```

In addition, the models are put on Zenodo, see https://zenodo.org/records/14993858 (2.3GB).

Prerequisites

  • JDK 1.8
  • Pytorch==1.7.1
  • transformers>=4.10.0
  • pip install transformers
  • pip install sentencepiece
  • setup Defect4J export PATH = $PATH:your/path/defects4j/framework/bin
  • configure Gzoltar: --formula "ochiai" --metric "entropy" --granularity "line" --inclPublicMethods --inclStaticConstructors --inclDeprecatedMethods

How to read repair_iteration folder

  • repairiteration/BugID/FLIteration/RankedSuspiciousStatement/Iterations (single test failure bug does not has FL iteration folder)

``` Example:

repairiteration/Math46/FL-2/1 indicates the second iteration (FL-2) of fault localization with 1st ranked suspicious statement (1). each suspicious statement has its iteration0/iteration1/iteration2. each iteration has its bugs.csv, patches.csv and revert.csv(to avoid the duplicated patches). ```

Checkout the buggy program and produce a ranked list for the bug.

python3 1_localize_fault.py projectID bugID init e.g., python3 1_localize_fault.py Chart 1 init The result will be found under projects/Chart1/build/sfl/txt/ochiai.ranking.csv

Transform the FL to input representation

The suspiciousthreshold by default configures to 0.1 and we consider at most top-50 ranked suspicious statements. ``` python3 2bugrepresentation.py projectID bugID suspiciousthreshold init e.g., python3 2bugrepresentation.py Chart 1 0.1 init ``` The result will be found under repair_iteration/Chart1/bugs.csv

Iterative Program Repair

python3 3_repair.py projectID bugID e.g., python3 3_repair.py Chart 1 The result will be found under repair_iteration/Chart1/1,...,n, where n is the ranked position of suspucious statements

Trace patches

python3 4_trace_patches.py The result will be found in patches.csv

Owner

  • Name: ASSERT
  • Login: ASSERT-KTH
  • Kind: organization
  • Location: Sweden

assertEquals("Research group at KTH Royal Institute of Technology, Stockholm, Sweden", description);

GitHub Events

Total
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 1
Last Year
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 1