Program: 142960
Project: 142960
Buggy source:
private void readVertex(String curLine,int num_vertices) throws Exception {
  String[] parts=null;
  int firstParts=-1;
  String index;
  String label=null;
  if (curLine.indexOf('"') != -1) {
    String[] initial_split=curLine.trim().split("String_Node_Str");
    if (initial_split.length < 2 || initial_split.length > 3) {
      report.logIssue(new Issue(NbBundle.getMessage(ImporterPajek.class,"String_Node_Str",reader.getLineNumber()),Issue.Level.SEVERE));
    }
    index=initial_split[0].trim();
    label=initial_split[1].trim();
    if (initial_split.length == 3) {
      parts=initial_split[2].trim().split("String_Node_Str",-1);
    }
    firstParts=0;
  }
 else {
    parts=curLine.trim().split("String_Node_Str",-1);
    index=parts[0];
switch (parts.length) {
case 1:
      break;
case 2:
    label=parts[1];
  break;
case 3:
firstParts=1;
break;
case 4:
firstParts=2;
break;
}
}
int v_id=Integer.parseInt(index) - 1;
if (v_id >= num_vertices || v_id < 0) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterPajek.class,"String_Node_Str",v_id,num_vertices),Issue.Level.SEVERE));
}
NodeDraft node=verticesArray[v_id];
if (label != null && label.length() > 0) {
node.setLabel(label);
}
if (firstParts != -1 && parts != null && parts.length >= firstParts + 2) {
for (int i=firstParts; i < parts.length; i++) {
if (i < parts.length - 1) {
try {
float x=Float.parseFloat(parts[i]);
float y=Float.parseFloat(parts[i + 1]);
node.setX(x);
node.setY(y);
i++;
}
 catch (Exception e) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterPajek.class,"String_Node_Str",reader.getLineNumber()),Issue.Level.WARNING));
}
}
if (parts[i].equals("String_Node_Str")) {
}
}
}
}

Fixed version (ground truth):
private void readVertex(String curLine,int num_vertices) throws Exception {
  String[] parts=null;
  int firstParts=-1;
  String index;
  String label=null;
  if (curLine.indexOf('"') != -1) {
    String[] initial_split=curLine.trim().split("String_Node_Str");
    if (initial_split.length < 1 || initial_split.length > 3) {
      report.logIssue(new Issue(NbBundle.getMessage(ImporterPajek.class,"String_Node_Str",reader.getLineNumber()),Issue.Level.SEVERE));
    }
    index=initial_split[0].trim();
    if (initial_split.length > 1) {
      label=initial_split[1].trim();
    }
    if (initial_split.length == 3) {
      parts=initial_split[2].trim().split("String_Node_Str",-1);
    }
    firstParts=0;
  }
 else {
    parts=curLine.trim().split("String_Node_Str",-1);
    index=parts[0];
switch (parts.length) {
case 1:
      break;
case 2:
    label=parts[1];
  break;
case 3:
firstParts=1;
break;
case 4:
firstParts=2;
break;
}
}
int v_id=Integer.parseInt(index) - 1;
if (v_id >= num_vertices || v_id < 0) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterPajek.class,"String_Node_Str",v_id,num_vertices),Issue.Level.SEVERE));
}
NodeDraft node=verticesArray[v_id];
if (label != null && label.length() > 0) {
node.setLabel(label);
}
if (firstParts != -1 && parts != null && parts.length >= firstParts + 2) {
for (int i=firstParts; i < parts.length; i++) {
if (i < parts.length - 1) {
try {
float x=Float.parseFloat(parts[i]);
float y=Float.parseFloat(parts[i + 1]);
node.setX(x);
node.setY(y);
i++;
}
 catch (Exception e) {
report.logIssue(new Issue(NbBundle.getMessage(ImporterPajek.class,"String_Node_Str",reader.getLineNumber()),Issue.Level.WARNING));
}
}
if (parts[i].equals("String_Node_Str")) {
}
}
}
}