Skip to content

Commit b5a2a8c

Browse files
eugen-shulimovibbem
authored andcommitted
fix: fix the analysis in the unparser experiment
1 parent 5408c72 commit b5a2a8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/variantsync/diffdetective/experiments/thesis_es/UnparseAnalysis.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public boolean analyzeVariationDiff(Analysis analysis) throws Exception {
3838
String textDiff = patch.getDiff();
3939
String codeBefore = "";
4040
String codeAfter = "";
41-
codeBefore = Files.readString(Path.of(patch.getFileName(Time.BEFORE)));
42-
codeAfter = Files.readString(Path.of(patch.getFileName(Time.AFTER)));
41+
codeBefore = VariationUnparser.undiff(patch.getDiff(), Time.BEFORE);
42+
codeAfter = VariationUnparser.undiff(patch.getDiff(), Time.AFTER);
4343
codeBefore = codeBefore.replaceAll("\\r\\n", "\n");
4444
codeAfter = codeAfter.replaceAll("\\r\\n", "\n");
4545
boolean[][] diffTestAll = runTestsDiff(textDiff);

0 commit comments

Comments
 (0)