Program: 123315
Project: 123315
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(parentNode);
    XmlMapUtil.detachNodeConnections(treeNodeRoot,mapperManager.getCopyOfMapData(),true);
    parentNode.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);
        nodeMap.clear();
      }
 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 (parentNode.getChildren().isEmpty()) {
        TreeNode rootNode=createModel();
        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);
        rootNode.setMain(true);
        parentNode.getChildren().add(rootNode);
        showError();
      }
    }
    AbstractInOutTree tree=null;
    if (parentNode.eContainer() instanceof InputXmlTree) {
      mapperManager.refreshInputTreeSchemaEditor((InputXmlTree)parentNode.eContainer());
      tree=(InputXmlTree)parentNode.eContainer();
    }
 else     if (parentNode.eContainer() instanceof OutputXmlTree) {
      mapperManager.refreshOutputTreeSchemaEditor((OutputXmlTree)parentNode.eContainer());
      tree=(OutputXmlTree)parentNode.eContainer();
    }
    if (tree != null) {
      mapperManager.getProblemsAnalyser().checkProblems(tree);
      mapperManager.getMapperUI().updateStatusBar();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  targetAbsolutePath=null;
  inputLoop=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);
        nodeMap.clear();
      }
 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));
        rootNode.setLoop(true);
        rootNode.setMain(true);
        schemaNode.getChildren().add(rootNode);
        showError();
      }
 else       if (inputLoop != null) {
        if (inputLoop.eContainer() == schemaNode) {
          if (!XmlMapUtil.isExpressionEditable(inputLoop)) {
            inputLoop.setLoop(false);
            inputLoop.setMain(false);
          }
        }
      }
    }
    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().checkProblems(tree);
      mapperManager.getMapperUI().updateStatusBar();
    }
  }
}