Program: 143042
Project: 143042
Buggy source:
private void parseNodes(NodeList nodeListE,String parent) throws Exception {
  for (int i=0; i < nodeListE.getLength(); i++) {
    Element nodeE=(Element)nodeListE.item(i);
    if (!nodeE.getNodeName().equals("String_Node_Str")) {
      report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeE.getNodeName()),Issue.Level.WARNING));
      return;
    }
    if (parent == null) {
      Progress.progress(progressTicket);
    }
    if (cancel) {
      return;
    }
    String nodeId=nodeE.getAttribute("String_Node_Str");
    if (nodeId.isEmpty()) {
      report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str"),Issue.Level.SEVERE));
      continue;
    }
    NodeDraft node=container.factory().newNodeDraft();
    node.setId(nodeId);
    if (!nodeE.getAttribute("String_Node_Str").isEmpty() && !nodeE.getAttribute("String_Node_Str").equals("String_Node_Str")) {
      String pid=nodeE.getAttribute("String_Node_Str");
      if (!container.nodeExists(pid)) {
        if (unknownParents.containsKey(pid)) {
          unknownParents.get(pid).add(nodeId);
        }
 else {
          List<String> childList=new ArrayList<String>();
          childList.add(nodeId);
          unknownParents.put(pid,childList);
        }
      }
 else {
        node.setParent(container.getNode(pid));
      }
    }
 else     if (parent != null) {
      node.setParent(container.getNode(parent));
    }
    String nodeLabel=nodeE.getAttribute("String_Node_Str");
    node.setLabel(nodeLabel);
    Node child=nodeE.getFirstChild();
    if (child != null) {
      do {
        if (child.getNodeName().equals("String_Node_Str")) {
          Node childE=child.getFirstChild();
          if (childE != null) {
            do {
              if (childE.getNodeName().equals("String_Node_Str")) {
                Element dataE=(Element)childE;
                setNodeData(dataE,node,nodeId);
              }
            }
 while ((childE=childE.getNextSibling()) != null);
          }
        }
      }
 while ((child=child.getNextSibling()) != null);
    }
    Element nodeColor=(Element)nodeE.getElementsByTagName("String_Node_Str").item(0);
    if (nodeColor != null) {
      String rStr=nodeColor.getAttribute("String_Node_Str");
      String gStr=nodeColor.getAttribute("String_Node_Str");
      String bStr=nodeColor.getAttribute("String_Node_Str");
      int r=(rStr.isEmpty()) ? 0 : Integer.parseInt(rStr);
      int g=(gStr.isEmpty()) ? 0 : Integer.parseInt(gStr);
      int b=(bStr.isEmpty()) ? 0 : Integer.parseInt(bStr);
      node.setColor(new Color(r,g,b));
    }
    Element nodePosition=(Element)nodeE.getElementsByTagName("String_Node_Str").item(0);
    if (nodePosition != null) {
      try {
        String xStr=nodePosition.getAttribute("String_Node_Str");
        if (!xStr.isEmpty()) {
          float x=Float.parseFloat(xStr);
          node.setX(x);
        }
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId,"String_Node_Str"),Issue.Level.WARNING));
      }
      try {
        String yStr=nodePosition.getAttribute("String_Node_Str");
        if (!yStr.isEmpty()) {
          float y=Float.parseFloat(yStr);
          node.setY(y);
        }
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId,"String_Node_Str"),Issue.Level.WARNING));
      }
      try {
        String zStr=nodePosition.getAttribute("String_Node_Str");
        if (!zStr.isEmpty()) {
          float z=Float.parseFloat(zStr);
          node.setZ(z);
        }
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId,"String_Node_Str"),Issue.Level.WARNING));
      }
    }
    Element nodeSize=(Element)nodeE.getElementsByTagName("String_Node_Str").item(0);
    if (nodeSize != null) {
      try {
        float size=Float.parseFloat(nodeSize.getAttribute("String_Node_Str"));
        node.setSize(size);
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId),Issue.Level.WARNING));
      }
    }
    if (isDynamicMode) {
      String nodeStart=null;
      String nodeEnd=null;
      if (!nodeE.getAttribute("String_Node_Str").isEmpty()) {
        nodeStart=nodeE.getAttribute("String_Node_Str");
      }
      if (!nodeE.getAttribute("String_Node_Str").isEmpty()) {
        nodeEnd=nodeE.getAttribute("String_Node_Str");
      }
      if (nodeStart != null || nodeEnd != null) {
        node.addTimeSlice(nodeStart,nodeEnd);
      }
    }
    container.addNode(node);
    Node childNode=nodeE.getFirstChild();
    if (childNode != null) {
      do {
        if (childNode.getNodeName().equals("String_Node_Str")) {
          Node childE=childNode.getFirstChild();
          NodeList childrenListE=childE.getChildNodes();
          if (childrenListE != null && childrenListE.getLength() > 0) {
            parseNodes(childrenListE,nodeId);
          }
        }
      }
 while ((childNode=childNode.getNextSibling()) != null);
    }
    Node childEdge=nodeE.getFirstChild();
    if (childEdge != null) {
      do {
        if (childEdge.getNodeName().equals("String_Node_Str")) {
          Node childE=childEdge.getFirstChild();
          NodeList childrenListE=childE.getChildNodes();
          if (childrenListE != null && childrenListE.getLength() > 0) {
            parseEdges(childrenListE,nodeId);
          }
        }
      }
 while ((childEdge=childEdge.getNextSibling()) != null);
    }
  }
}

Fixed version (ground truth):
private void parseNodes(NodeList nodeListE,String parent) throws Exception {
  for (int i=0; i < nodeListE.getLength(); i++) {
    if (nodeListE.item(i).getNodeType() != ELEMENT_NODE) {
      continue;
    }
    Element nodeE=(Element)nodeListE.item(i);
    if (!nodeE.getNodeName().equals("String_Node_Str")) {
      report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeE.getNodeName()),Issue.Level.WARNING));
      return;
    }
    if (parent == null) {
      Progress.progress(progressTicket);
    }
    if (cancel) {
      return;
    }
    String nodeId=nodeE.getAttribute("String_Node_Str");
    if (nodeId.isEmpty()) {
      report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str"),Issue.Level.SEVERE));
      continue;
    }
    NodeDraft node=container.factory().newNodeDraft();
    node.setId(nodeId);
    if (!nodeE.getAttribute("String_Node_Str").isEmpty() && !nodeE.getAttribute("String_Node_Str").equals("String_Node_Str")) {
      String pid=nodeE.getAttribute("String_Node_Str");
      if (!container.nodeExists(pid)) {
        if (unknownParents.containsKey(pid)) {
          unknownParents.get(pid).add(nodeId);
        }
 else {
          List<String> childList=new ArrayList<String>();
          childList.add(nodeId);
          unknownParents.put(pid,childList);
        }
      }
 else {
        node.setParent(container.getNode(pid));
      }
    }
 else     if (parent != null) {
      node.setParent(container.getNode(parent));
    }
    String nodeLabel=nodeE.getAttribute("String_Node_Str");
    node.setLabel(nodeLabel);
    Node child=nodeE.getFirstChild();
    if (child != null) {
      do {
        if (child.getNodeName().equals("String_Node_Str")) {
          Node childE=child.getFirstChild();
          if (childE != null) {
            do {
              if (childE.getNodeName().equals("String_Node_Str")) {
                Element dataE=(Element)childE;
                setNodeData(dataE,node,nodeId);
              }
            }
 while ((childE=childE.getNextSibling()) != null);
          }
        }
      }
 while ((child=child.getNextSibling()) != null);
    }
    Element nodeColor=(Element)nodeE.getElementsByTagName("String_Node_Str").item(0);
    if (nodeColor != null) {
      String rStr=nodeColor.getAttribute("String_Node_Str");
      String gStr=nodeColor.getAttribute("String_Node_Str");
      String bStr=nodeColor.getAttribute("String_Node_Str");
      int r=(rStr.isEmpty()) ? 0 : Integer.parseInt(rStr);
      int g=(gStr.isEmpty()) ? 0 : Integer.parseInt(gStr);
      int b=(bStr.isEmpty()) ? 0 : Integer.parseInt(bStr);
      node.setColor(new Color(r,g,b));
    }
    Element nodePosition=(Element)nodeE.getElementsByTagName("String_Node_Str").item(0);
    if (nodePosition != null) {
      try {
        String xStr=nodePosition.getAttribute("String_Node_Str");
        if (!xStr.isEmpty()) {
          float x=Float.parseFloat(xStr);
          node.setX(x);
        }
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId,"String_Node_Str"),Issue.Level.WARNING));
      }
      try {
        String yStr=nodePosition.getAttribute("String_Node_Str");
        if (!yStr.isEmpty()) {
          float y=Float.parseFloat(yStr);
          node.setY(y);
        }
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId,"String_Node_Str"),Issue.Level.WARNING));
      }
      try {
        String zStr=nodePosition.getAttribute("String_Node_Str");
        if (!zStr.isEmpty()) {
          float z=Float.parseFloat(zStr);
          node.setZ(z);
        }
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId,"String_Node_Str"),Issue.Level.WARNING));
      }
    }
    Element nodeSize=(Element)nodeE.getElementsByTagName("String_Node_Str").item(0);
    if (nodeSize != null) {
      try {
        float size=Float.parseFloat(nodeSize.getAttribute("String_Node_Str"));
        node.setSize(size);
      }
 catch (      NumberFormatException e) {
        report.logIssue(new Issue(NbBundle.getMessage(ImporterGEXF.class,"String_Node_Str",nodeId),Issue.Level.WARNING));
      }
    }
    if (isDynamicMode) {
      String nodeStart=null;
      String nodeEnd=null;
      if (!nodeE.getAttribute("String_Node_Str").isEmpty()) {
        nodeStart=nodeE.getAttribute("String_Node_Str");
      }
      if (!nodeE.getAttribute("String_Node_Str").isEmpty()) {
        nodeEnd=nodeE.getAttribute("String_Node_Str");
      }
      if (nodeStart != null || nodeEnd != null) {
        node.addTimeSlice(nodeStart,nodeEnd);
      }
    }
    container.addNode(node);
    Node childNodes=nodeE.getFirstChild();
    if (childNodes != null) {
      do {
        if (childNodes.getNodeName().equals("String_Node_Str")) {
          NodeList childrenListE=childNodes.getChildNodes();
          if (childrenListE != null && childrenListE.getLength() > 0) {
            parseNodes(childrenListE,nodeId);
          }
        }
      }
 while ((childNodes=childNodes.getNextSibling()) != null);
    }
    Node childEdges=nodeE.getFirstChild();
    if (childEdges != null) {
      do {
        if (childEdges.getNodeName().equals("String_Node_Str")) {
          NodeList childrenListE=childEdges.getChildNodes();
          if (childrenListE != null && childrenListE.getLength() > 0) {
            parseEdges(childrenListE,nodeId);
          }
        }
      }
 while ((childEdges=childEdges.getNextSibling()) != null);
    }
  }
}