Program: 123687
Project: 123687
Buggy source:
@Override public void run(){
  targetAbsolutePath=null;
  RepositoryXmlSelectionDialog reviewDialog=new RepositoryXmlSelectionDialog(shell,new String[]{"String_Node_Str","String_Node_Str"});
  if (reviewDialog.open() == Window.OK) {
    TreeNode treeNodeRoot=XmlMapUtil.getTreeNodeRoot(schemaNode);
    XmlMapUtil.detachNodeConnections(treeNodeRoot,mapperManager.getCopyOfMapData(),true);
    schemaNode.getChildren().clear();
    RepositoryNode repositoryNode=reviewDialog.getResult();
    Item item=repositoryNode.getObject().getProperty().getItem();
    try {
      if (item instanceof XmlFileConnectionItem) {
        XmlFileConnectionItem xmlitem=(XmlFileConnectionItem)item;
        XmlFileConnection connection=(XmlFileConnection)xmlitem.getConnection();
        prepareEmfTreeFromXml(connection);
      }
 else       if (item instanceof MDMConnectionItem) {
        String selectedSchema=(String)repositoryNode.getProperties(EProperties.LABEL);
        MDMConnection connection=(MDMConnection)((MDMConnectionItem)item).getConnection();
        prepareEmfTreeFromMdm(connection,selectedSchema);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
 finally {
      if (schemaNode.getChildren().isEmpty()) {
        TreeNode rootNode=createModel();
        rootNode.setName("String_Node_Str");
        rootNode.setNodeType(NodeType.ELEMENT);
        rootNode.setType(XmlMapUtil.DEFAULT_DATA_TYPE);
        rootNode.setXpath(XmlMapUtil.getXPath(schemaNode.getXpath(),"String_Node_Str",NodeType.ELEMENT));
        schemaNode.getChildren().add(rootNode);
        showError();
      }
    }
    if (loopNode == null && !schemaNode.getChildren().isEmpty()) {
      schemaNode.getChildren().get(0).setLoop(true);
      schemaNode.getChildren().get(0).setMain(true);
    }
    AbstractInOutTree tree=null;
    if (schemaNode.eContainer() instanceof InputXmlTree) {
      mapperManager.refreshInputTreeSchemaEditor((InputXmlTree)schemaNode.eContainer());
      tree=(InputXmlTree)schemaNode.eContainer();
    }
 else     if (schemaNode.eContainer() instanceof OutputXmlTree) {
      mapperManager.refreshOutputTreeSchemaEditor((OutputXmlTree)schemaNode.eContainer());
      tree=(OutputXmlTree)schemaNode.eContainer();
    }
    if (tree != null) {
      mapperManager.getProblemsAnalyser().checkLoopProblems(tree);
      mapperManager.getMapperUI().updateStatusBar();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  targetAbsolutePath=null;
  RepositoryXmlSelectionDialog reviewDialog=new RepositoryXmlSelectionDialog(shell,new String[]{"String_Node_Str","String_Node_Str"});
  if (reviewDialog.open() == Window.OK) {
    TreeNode treeNodeRoot=XmlMapUtil.getTreeNodeRoot(schemaNode);
    XmlMapUtil.detachNodeConnections(treeNodeRoot,mapperManager.getCopyOfMapData(),true);
    schemaNode.getChildren().clear();
    RepositoryNode repositoryNode=reviewDialog.getResult();
    Item item=repositoryNode.getObject().getProperty().getItem();
    try {
      if (item instanceof XmlFileConnectionItem) {
        XmlFileConnectionItem xmlitem=(XmlFileConnectionItem)item;
        XmlFileConnection connection=(XmlFileConnection)xmlitem.getConnection();
        prepareEmfTreeFromXml(connection);
      }
 else       if (item instanceof MDMConnectionItem) {
        String selectedSchema=(String)repositoryNode.getProperties(EProperties.LABEL);
        MDMConnection connection=(MDMConnection)((MDMConnectionItem)item).getConnection();
        prepareEmfTreeFromMdm(connection,selectedSchema);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
 finally {
      if (schemaNode.getChildren().isEmpty()) {
        TreeNode rootNode=createModel();
        rootNode.setName("String_Node_Str");
        rootNode.setNodeType(NodeType.ELEMENT);
        rootNode.setType(XmlMapUtil.DEFAULT_DATA_TYPE);
        rootNode.setXpath(XmlMapUtil.getXPath(schemaNode.getXpath(),"String_Node_Str",NodeType.ELEMENT));
        schemaNode.getChildren().add(rootNode);
        showError();
      }
    }
    if (loopNode == null && !schemaNode.getChildren().isEmpty()) {
      schemaNode.getChildren().get(0).setLoop(true);
      schemaNode.getChildren().get(0).setMain(true);
    }
 else     if (loopNode != null) {
      XmlMapUtil.upsetMainNode(loopNode);
    }
    AbstractInOutTree tree=null;
    if (schemaNode.eContainer() instanceof InputXmlTree) {
      mapperManager.refreshInputTreeSchemaEditor((InputXmlTree)schemaNode.eContainer());
      tree=(InputXmlTree)schemaNode.eContainer();
    }
 else     if (schemaNode.eContainer() instanceof OutputXmlTree) {
      mapperManager.refreshOutputTreeSchemaEditor((OutputXmlTree)schemaNode.eContainer());
      tree=(OutputXmlTree)schemaNode.eContainer();
    }
    if (tree != null) {
      mapperManager.getProblemsAnalyser().checkLoopProblems(tree);
      mapperManager.getMapperUI().updateStatusBar();
    }
  }
}