Program: 123963
Project: 123963
Buggy source:
@Override public void run(){
  List<FOXTreeNode> list=new ArrayList<FOXTreeNode>();
  FileDialog f=new FileDialog(shell);
  String file=f.open();
  if (file != null) {
    boolean clickOk=TreeUtil.getFoxTreeNodesForXmlMap(file,shell,list);
    if (clickOk) {
      TreeNode treeNodeRoot=XmlMapUtil.getTreeNodeRoot(parentNode);
      XmlMapUtil.detachNodeConnections(treeNodeRoot,mapperManager.getCopyOfMapData(),true);
      parentNode.getChildren().clear();
      prepareEmfTreeNode(list,parentNode);
      if (parentNode.getChildren().isEmpty()) {
        TreeNode rootNode=null;
        if (input) {
          rootNode=XmlmapFactory.eINSTANCE.createTreeNode();
        }
 else {
          rootNode=XmlmapFactory.eINSTANCE.createOutputTreeNode();
        }
        rootNode.setName("String_Node_Str");
        rootNode.setNodeType(NodeType.ELEMENT);
        rootNode.setType(XmlMapUtil.DEFAULT_DATA_TYPE);
        rootNode.setXpath(XmlMapUtil.getXPath(parentNode.getXpath(),"String_Node_Str",NodeType.ELEMENT));
        parentNode.getChildren().add(rootNode);
        showError();
      }
      if (parentNode.eContainer() instanceof InputXmlTree) {
        mapperManager.refreshInputTreeSchemaEditor((InputXmlTree)parentNode.eContainer());
      }
 else       if (parentNode.eContainer() instanceof OutputXmlTree) {
        mapperManager.refreshOutputTreeSchemaEditor((OutputXmlTree)parentNode.eContainer());
      }
      if (treeNodeRoot.eContainer() instanceof AbstractInOutTree) {
        mapperManager.getProblemsAnalyser().checkLoopProblems((AbstractInOutTree)treeNodeRoot.eContainer());
        mapperManager.getMapperUI().updateStatusBar();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  List<FOXTreeNode> list=new ArrayList<FOXTreeNode>();
  FileDialog f=new FileDialog(shell);
  String file=f.open();
  if (file != null) {
    boolean clickOk=TreeUtil.getFoxTreeNodesForXmlMap(file,shell,list);
    if (clickOk) {
      TreeNode treeNodeRoot=XmlMapUtil.getTreeNodeRoot(parentNode);
      isLoopModel=false;
      XmlMapUtil.detachNodeConnections(treeNodeRoot,mapperManager.getCopyOfMapData(),true);
      parentNode.getChildren().clear();
      prepareEmfTreeNode(list,parentNode);
      if (parentNode.getChildren().isEmpty()) {
        TreeNode rootNode=null;
        if (input) {
          rootNode=XmlmapFactory.eINSTANCE.createTreeNode();
        }
 else {
          rootNode=XmlmapFactory.eINSTANCE.createOutputTreeNode();
        }
        rootNode.setName("String_Node_Str");
        rootNode.setNodeType(NodeType.ELEMENT);
        rootNode.setType(XmlMapUtil.DEFAULT_DATA_TYPE);
        rootNode.setXpath(XmlMapUtil.getXPath(parentNode.getXpath(),"String_Node_Str",NodeType.ELEMENT));
        rootNode.setLoop(true);
        parentNode.getChildren().add(rootNode);
        showError();
      }
      if (parentNode.eContainer() instanceof InputXmlTree) {
        mapperManager.refreshInputTreeSchemaEditor((InputXmlTree)parentNode.eContainer());
      }
 else       if (parentNode.eContainer() instanceof OutputXmlTree) {
        mapperManager.refreshOutputTreeSchemaEditor((OutputXmlTree)parentNode.eContainer());
      }
      if (treeNodeRoot.eContainer() instanceof AbstractInOutTree) {
        mapperManager.getProblemsAnalyser().checkLoopProblems((AbstractInOutTree)treeNodeRoot.eContainer());
        mapperManager.getMapperUI().updateStatusBar();
      }
    }
  }
}