Program: 119903
Project: 119903
Buggy source:
private List treeNodeAdapt(){
  List<HL7TreeNode> list=new ArrayList<HL7TreeNode>();
  FileDialog f=null;
  if (hl7ui != null) {
    f=new FileDialog(hl7ui.getHl7UIParent().getShell());
  }
 else   if (form != null) {
    f=new FileDialog(form.getShell());
  }
  String file=f.open();
  if (file == null) {
    return list;
  }
  HL7Parse hl7Parse=new HL7Parse();
  List<String> msgContentList=new ArrayList<String>();
  List<Message> messageList=hl7Parse.doParse(file,"String_Node_Str","String_Node_Str");
  List<HL7TreeNode> nodeList=hl7Util.getHL7TreeNodes(messageList);
  List schemaList=new ArrayList();
  for (  Message message : messageList) {
    schemaList.addAll(hl7Util.getFirstLevelChild(message));
  }
  if (!nodeList.isEmpty()) {
    HL7TreeNode hl7TreeNode=nodeList.get(0);
    List<HL7FileNode> table=new ArrayList<HL7FileNode>();
    if (hl7Connection != null) {
      EList root=hl7Connection.getRoot();
      root.clear();
      if (hl7TreeNode != null) {
        hl7Util.initNodeOrder(hl7TreeNode,orderMap,order);
        hl7Util.tableLoader((Element)hl7TreeNode,"String_Node_Str",root,hl7TreeNode.getDefaultValue(),orderMap);
      }
      table.addAll(root);
    }
 else {
      if (hl7TreeNode != null) {
        hl7Util.initNodeOrder(hl7TreeNode,orderMap,order);
        hl7Util.tableLoader((Element)hl7TreeNode,"String_Node_Str",table,hl7TreeNode.getDefaultValue(),orderMap);
      }
    }
    initXmlTreeData(schemaList,table,list);
  }
  return list;
}

Fixed version (ground truth):
private List treeNodeAdapt(){
  List<HL7TreeNode> treeData=new ArrayList<HL7TreeNode>();
  FileDialog f=null;
  if (hl7ui != null) {
    f=new FileDialog(hl7ui.getHl7UIParent().getShell());
  }
 else   if (form != null) {
    f=new FileDialog(form.getShell());
  }
  String file=f.open();
  if (file == null) {
    return treeData;
  }
  HL7Parse hl7Parse=new HL7Parse();
  List<String> msgContentList=new ArrayList<String>();
  List<Message> messageList=hl7Parse.doParse(file,"String_Node_Str","String_Node_Str");
  List<HL7TreeNode> nodeList=hl7Util.getHL7TreeNodes(messageList);
  if (!nodeList.isEmpty()) {
    HL7TreeNode hl7TreeNode=nodeList.get(0);
    List<HL7FileNode> table=new ArrayList<HL7FileNode>();
    if (hl7Connection != null) {
      EList root=hl7Connection.getRoot();
      root.clear();
      if (hl7TreeNode != null) {
        hl7Util.initNodeOrder(hl7TreeNode,orderMap,order);
        hl7Util.tableLoader((Element)hl7TreeNode,"String_Node_Str",root,hl7TreeNode.getDefaultValue(),orderMap);
      }
      table.addAll(root);
    }
 else {
      if (hl7TreeNode != null) {
        hl7Util.initNodeOrder(hl7TreeNode,orderMap,order);
        hl7Util.tableLoader((Element)hl7TreeNode,"String_Node_Str",table,hl7TreeNode.getDefaultValue(),orderMap);
      }
    }
    List<String> schemaList=new ArrayList<String>();
    for (    HL7FileNode node : table) {
      String columnName=node.getRelatedColumn();
      if (columnName.contains("String_Node_Str")) {
        columnName=columnName.substring(0,columnName.indexOf("String_Node_Str"));
      }
      if (!schemaList.contains(columnName) && !"String_Node_Str".equals(columnName)) {
        schemaList.add(columnName);
      }
    }
    initXmlTreeData(schemaList,table,treeData);
  }
  return treeData;
}