Here the ground truth of the target code window is to insert another except statement between Line 4 & 5;
Prior edit 1 is shown under our TRACE representation (6 labels), where black boundary lines indicate the edit semantic boundaries.
Under TRACE representation, prior edit 1 has: insertion, replace, insert and replace.
While under traditional 3-label representation, prior edit 1 is a single replace edit.
Here, TRACE locator compares the target window with prior edit 1, only references the second insertion block, and outputs the correct answer.
Locator with 3 labels, on the other hand, can not extract helpful semantics from the single edit representation, and detects 0 edits in this code window.
You may refer to the original GitHub commit for more details of this edit.
Here the ground truth of the target code window is to delete code 8~10, then insert new code;
Prior edit 1 is shown under our TRACE representation (6 labels), where black boundary lines indicate the edit semantic boundaries.
Under TRACE representation, prior edit 1 indicates that ret.append() statement is related to replace semantic.
TRACE therefore follows the semantic in prior edit 1, falsely labels Line 7 ~ 10 with REPLACE
Locator with 3 labels also labels Line 7 ~ 10 with REPLACE.
However, since 3-label representation does not distinguish between replace and delete semantics, the prediction is considered correct.
TRACE considers this prediction wrong, as it doesn't tolerate obfuscation.
This shows that the 3-label locating task is inherently easier than the 6-label locating task.
You may refer to the original GitHub commit for more details of this edit.
Here the ground truth of the target code window is to delete code line 3~4.
However, 3 label representation does not distinguish between delete and replace.
Therefore, 3 label generator failed to generate an empty string.
Meanwhile TRACE generator successfully outputs an empty string due to clear instructions.
You may refer to the original GitHub commit for more details of this edit.
Here the ground truth of the target code window is to insert a logger.info() statement after line 3.
Prior edit 1 is shown under our TRACE representation (6 labels), where black boundary lines indicate the edit semantic boundaries.
TRACE generator can extract 2 major edit semantics:
Insert if statement and logger.info() statement;
Replace bool args from False to True.
Hence, given the target code window and insertion label, TRACE generator outputs the logger.info() statement.
For 3-label representation, prior edit 1 is a large chunk of edit, which the model has trouble extracting the semantics for the target window.
Hence 3-label generator directly copies the prior edit.
You may refer to the original GitHub commit for more details of this edit.
Here the ground truth of the target code window is to replace line 2.
However, because the code window is a comment, our labelling methods failed to label the window as replace, but instead label it as delete + insert.
Following the false edit instruction, TRACE generator outputs a wrong answer.
The 3-label generator outputs the correct answer due to simpler and robust edit representation.
You may refer to the original GitHub commit for more details of this edit.