Fix the issue of getting buggy statements and fixed statements.
This commit is contained in:
@@ -228,9 +228,8 @@ public class Miner {
|
|||||||
int counter3 = 0; // counter of non-buggy code line.
|
int counter3 = 0; // counter of non-buggy code line.
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
if (startLine == 0 && line.startsWith("@@ -")) {
|
if (startLine == 0 && line.startsWith("@@ -")) {
|
||||||
String lineNum = line.substring(4);
|
int plusIndex = line.indexOf("+");
|
||||||
int plusIndex = lineNum.indexOf("+");
|
String lineNum = line.substring(4, plusIndex);
|
||||||
lineNum = lineNum.substring(0, plusIndex);
|
|
||||||
String[] nums = lineNum.split(",");
|
String[] nums = lineNum.split(",");
|
||||||
if (nums.length != 2) {
|
if (nums.length != 2) {
|
||||||
System.out.println("Line Num: " + line + ", Old line: " + startLineNum + " - " + endLineNum);
|
System.out.println("Line Num: " + line + ", Old line: " + startLineNum + " - " + endLineNum);
|
||||||
|
|||||||
Reference in New Issue
Block a user