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