Published August 20, 2020 | Version v2
Dataset Restricted

Artifacts of PEARL

Authors/Creators

Description

This repository contain the artifacts of a paper titled "Program Repair as a Code Completion Problem: Addressing the Challenge of Accurately Locating Fine-Grained Buggy Code Elements" under review by ICSE'21.

The files prediction_CoCoNut.csv and prediction_ManySStuBs4J.csv illustrate the prediction results of BEP on the two datasets, in which the column element_Rank shows the ranking of buggy element and the column rank is for operation path.

The file Pipeline_Results.zip contains the results of our repair pipeline on the 111 single-token bugs. In each folder, rem.txt corresponds to the buggy line, add.txt corresponds to the correct line, and context.txt corresponds to the whole buggy method. These three files are required inputs for each prediction. query.txt is the content sent to AnyCodeGen and the returned code fragment is stored in result.txt

We also open the cleaned dataset of ManySStuBs4J which only contains single-token bugs in Single-token_bugs_in_ManySStuBs4J.zip. In this file, each bug is corresponding to three lines with the same line number in three different files which are rem.txt, add.txt, and context.txt, respectively representing the buggy line, correct line, and the buggy method. This storage style follows the training set of CoCoNut. Note that we do not release our pre-processed dataset of CoCoNut sinse it is too large. We encourage researchers to process this dataset based on their own needs. Moreover, we do provide the script we used for selecting single-token bugs which is single-token_selection.py.

We also note there is no visual interface for the newly added bugs in Defects4J-V2.0. We thus provide our script for selecting single-token bugs (getSingle-token_bugs_from_D4J.py) from these bugs, making it easy for others to reproduce our experiment. 

Case Study:

PEARL does not work well on method name-related fix. For the following bug (Closure-10), our BEP model successfully predicts the oracle operation path as No.2.

-      return allResultsMatch(n, MAY_BE_STRING_PREDICATE);
+      return anyResultsMatch(n, MAY_BE_STRING_PREDICATE);

Nonetheless, we have to change this statement into "return ??" when querying AnyCodeGen due to the format restriction of it. Unfortunately, AnyCodeGen cannot synthesize such a detailed method call, thus leading to the failure of PEARL of repairing this bug.

 

 

The source code of PEARL will be open-access upon acceptance.

Files

Restricted

The record is publicly accessible, but files are restricted. Log in to check if you have access.