Read diff entry file.
This commit is contained in:
@@ -9,6 +9,7 @@ public class DiffEntryHunk {
|
|||||||
private String hunk;
|
private String hunk;
|
||||||
private int buggyHunkSize;
|
private int buggyHunkSize;
|
||||||
private int fixedHunkSize;
|
private int fixedHunkSize;
|
||||||
|
private String file;
|
||||||
|
|
||||||
public DiffEntryHunk(int bugLineStartNum, int fixLineStartNum, int bugRange, int fixRange) {
|
public DiffEntryHunk(int bugLineStartNum, int fixLineStartNum, int bugRange, int fixRange) {
|
||||||
super();
|
super();
|
||||||
@@ -58,6 +59,14 @@ public class DiffEntryHunk {
|
|||||||
this.fixedHunkSize = fixedHunkSize;
|
this.fixedHunkSize = fixedHunkSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getFile() {
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile(String file) {
|
||||||
|
this.file = file;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "@@ -" + this.bugLineStartNum + ", " + this.bugRange + " +" + this.fixLineStartNum + ", " + this.fixRange + "\n" + this.hunk;
|
return "@@ -" + this.bugLineStartNum + ", " + this.bugRange + " +" + this.fixLineStartNum + ", " + this.fixRange + "\n" + this.hunk;
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ public class DiffEntryReader {
|
|||||||
diffEntryHunk.setHunk(hunk.toString());
|
diffEntryHunk.setHunk(hunk.toString());
|
||||||
diffEntryHunk.setBuggyHunkSize(buggyHunkSize);
|
diffEntryHunk.setBuggyHunkSize(buggyHunkSize);
|
||||||
diffEntryHunk.setFixedHunkSize(fixedHunkSize);
|
diffEntryHunk.setFixedHunkSize(fixedHunkSize);
|
||||||
|
diffEntryHunk.setFile(diffentryFile.getPath());
|
||||||
diffentryHunks.add(diffEntryHunk);
|
diffentryHunks.add(diffEntryHunk);
|
||||||
}
|
}
|
||||||
hunk.setLength(0);
|
hunk.setLength(0);
|
||||||
@@ -225,6 +226,7 @@ public class DiffEntryReader {
|
|||||||
diffEntryHunk.setHunk(hunk.toString());
|
diffEntryHunk.setHunk(hunk.toString());
|
||||||
diffEntryHunk.setBuggyHunkSize(buggyHunkSize);
|
diffEntryHunk.setBuggyHunkSize(buggyHunkSize);
|
||||||
diffEntryHunk.setFixedHunkSize(fixedHunkSize);
|
diffEntryHunk.setFixedHunkSize(fixedHunkSize);
|
||||||
|
diffEntryHunk.setFile(diffentryFile.getPath());
|
||||||
diffentryHunks.add(diffEntryHunk);
|
diffentryHunks.add(diffEntryHunk);
|
||||||
hunk.setLength(0);
|
hunk.setLength(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user