nus-yam/ex-repair huggingface dataset:
Program: 123846
Project: 123846
Buggy source:
@Override public void run(){
  IStructuredSelection selection=(IStructuredSelection)selectionProvider.getSelection();
  RepositoryNode firstNode=(RepositoryNode)selection.getFirstElement();
  if (firstNode.getProperties(EProperties.CONTENT_TYPE) == RepositoryNodeType.FOLDER) {
    firstNode=repositoryNodeManager.getRepositoryNodebyName(connParam.getRepositoryName());
  }
  List<String> repositoryNames=repositoryNodeManager.getALLReposotoryNodeNames();
  IRepositoryViewObject object=SQLBuilderRepositoryNodeManager.getRoot(firstNode).getObject();
  connParam.setRepositoryName(object.getLabel());
  connParam.setRepositoryId(object.getId());
  if (isQuery) {
    DBTreeProvider provider=(DBTreeProvider)selectionProvider.getContentProvider();
    selectReveal(provider.getSelectedExtReposiotryNode());
    isQuery=false;
  }
 else {
    connParam.setEditorTitle(TextUtil.getNewQueryLabel());
  }
  dialog.openEditor(firstNode,repositoryNames,connParam,false);
}

Fixed version (ground truth):
@Override public void run(){
  IStructuredSelection selection=(IStructuredSelection)selectionProvider.getSelection();
  RepositoryNode firstNode=(RepositoryNode)selection.getFirstElement();
  if (firstNode.getProperties(EProperties.CONTENT_TYPE) == RepositoryNodeType.FOLDER) {
    firstNode=repositoryNodeManager.getRepositoryNodebyName(connParam.getRepositoryName());
  }
  List<String> repositoryNames=repositoryNodeManager.getALLReposotoryNodeNames();
  IRepositoryViewObject object=SQLBuilderRepositoryNodeManager.getRoot(firstNode).getObject();
  connParam.setRepositoryName(object.getLabel());
  connParam.setRepositoryId(object.getId());
  if (!connParam.isFirstOpenSqlBuilder()) {
    connParam.setQuery("String_Node_Str");
  }
  connParam.setFirstOpenSqlBuilder(false);
  if (isQuery) {
    DBTreeProvider provider=(DBTreeProvider)selectionProvider.getContentProvider();
    selectReveal(provider.getSelectedExtReposiotryNode());
    isQuery=false;
  }
 else {
    connParam.setEditorTitle(TextUtil.getNewQueryLabel());
  }
  dialog.openEditor(firstNode,repositoryNames,connParam,false);
}
Program: 123848
Project: 123848
Buggy source:
private void deleteNoUseTable(){
  DatabaseConnection connection=(DatabaseConnection)SQLBuilderRepositoryNodeManager.getItem(SQLBuilderRepositoryNodeManager.getRoot(nodeInEditor)).getConnection();
  if (SQLBuilderRepositoryNodeManager.tList instanceof List) {
    if (SQLBuilderRepositoryNodeManager.tList.size() == 0) {
      SQLBuilderRepositoryNodeManager.tList.addAll(ConnectionHelper.getTables(connection));
    }
  }
 else {
    SQLBuilderRepositoryNodeManager.tList=new ArrayList<MetadataTable>();
    SQLBuilderRepositoryNodeManager.tList.addAll(ConnectionHelper.getTables(connection));
  }
  if (SQLBuilderRepositoryNodeManager.tList == null || SQLBuilderRepositoryNodeManager.tList.size() == 0) {
    return;
  }
  if (node == null) {
    return;
  }
  IRepositoryViewObject repositoryObject=node.getObject();
  Item item=repositoryObject.getProperty().getItem();
  if (item instanceof DatabaseConnectionItem) {
    manager.deleteNouseTables(((DatabaseConnectionItem)item).getConnection());
  }
}

Fixed version (ground truth):
private void deleteNoUseTable(){
  DatabaseConnection connection=(DatabaseConnection)SQLBuilderRepositoryNodeManager.getItem(SQLBuilderRepositoryNodeManager.getRoot(nodeInEditor)).getConnection();
  if (SQLBuilderRepositoryNodeManager.tList instanceof List) {
    if (SQLBuilderRepositoryNodeManager.tList.size() == 0) {
      SQLBuilderRepositoryNodeManager.tList.addAll(ConnectionHelper.getTables(connection));
    }
  }
 else {
    SQLBuilderRepositoryNodeManager.tList=new ArrayList<MetadataTable>();
    SQLBuilderRepositoryNodeManager.tList.addAll(ConnectionHelper.getTables(connection));
  }
  if (SQLBuilderRepositoryNodeManager.tList == null || SQLBuilderRepositoryNodeManager.tList.size() == 0) {
    return;
  }
  if (node == null) {
    SQLBuilderRepositoryNodeManager.tList=null;
    return;
  }
  IRepositoryViewObject repositoryObject=node.getObject();
  Item item=repositoryObject.getProperty().getItem();
  if (item instanceof DatabaseConnectionItem) {
    manager.deleteNouseTables(((DatabaseConnectionItem)item).getConnection());
  }
}
Program: 123849
Project: 123849
Buggy source:
/** 
 * Creates tab folder.
 */
private void createTabFolder(){
  if (tabFolder == null || tabFolder.isDisposed()) {
    clearParent();
    tabFolder=new CTabFolder(this,SWT.NULL | SWT.BORDER | SWT.CLOSE);
    tabFolder.setSimple(false);
    tabFolder.setToolTipText(Messages.getString("String_Node_Str"));
    this.layout();
    this.redraw();
  }
}

Fixed version (ground truth):
/** 
 * Creates tab folder.
 */
private void createTabFolder(){
  if (tabFolder == null || tabFolder.isDisposed()) {
    clearParent();
    tabFolder=new CTabFolder(this,SWT.NULL | SWT.BORDER);
    tabFolder.setSimple(false);
    tabFolder.setToolTipText(Messages.getString("String_Node_Str"));
    this.layout();
    this.redraw();
  }
}
Program: 123851
Project: 123851
Buggy source:
@Override public Object getAdapter(final Class adapter){
  if (designerEditor.equals(getActiveEditor())) {
    return this.getActiveEditor().getAdapter(adapter);
  }
  return super.getAdapter(adapter);
}

Fixed version (ground truth):
public Object getAdapter(Class adapter){
  return null;
}
Program: 123853
Project: 123853
Buggy source:
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  addCompiler();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  addCompiler();
  getSourceViewer().setEditable(isEditable());
}
Program: 123855
Project: 123855
Buggy source:
@Override public Object getAdapter(final Class adapter){
  if (designerEditor.equals(getActiveEditor())) {
    return this.getActiveEditor().getAdapter(adapter);
  }
  return super.getAdapter(adapter);
}

Fixed version (ground truth):
public Object getAdapter(Class adapter){
  return null;
}
Program: 123857
Project: 123857
Buggy source:
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  addCompiler();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  addCompiler();
  getSourceViewer().setEditable(isEditable());
}
Program: 123858
Project: 123858
Buggy source:
public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}
Program: 123859
Project: 123859
Buggy source:
public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}
Program: 123862
Project: 123862
Buggy source:
@Override public void execute(){
  AbstractMultiPageTalendEditor multiPageTalendEditor=(AbstractMultiPageTalendEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
  GraphicalViewer viewer=multiPageTalendEditor.getTalendEditor().getViewer();
  oldSelection=new ArrayList<EditPart>();
  for (  EditPart editPart : (List<EditPart>)viewer.getSelectedEditParts()) {
    oldSelection.add(editPart);
  }
  viewer.deselectAll();
  super.execute();
  EditPart processPart=(EditPart)viewer.getRootEditPart().getChildren().get(0);
  if (processPart instanceof ProcessPart) {
    List<EditPart> sel=new ArrayList<EditPart>();
    for (    EditPart editPart : (List<EditPart>)processPart.getChildren()) {
      if (editPart instanceof NodePart) {
        Node currentNode=(Node)editPart.getModel();
        if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer())) {
          sel.add(editPart);
        }
      }
 else       if (editPart instanceof NoteEditPart) {
        Note currentNode=(Note)editPart.getModel();
        if (noteCmd.getNoteList().contains(currentNode)) {
          sel.add(editPart);
        }
      }
    }
    StructuredSelection s=new StructuredSelection(sel);
    viewer.setSelection(s);
  }
}

Fixed version (ground truth):
@Override public void execute(){
  AbstractMultiPageTalendEditor multiPageTalendEditor=(AbstractMultiPageTalendEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
  GraphicalViewer viewer=multiPageTalendEditor.getTalendEditor().getViewer();
  oldSelection=new ArrayList<EditPart>();
  for (  EditPart editPart : (List<EditPart>)viewer.getSelectedEditParts()) {
    oldSelection.add(editPart);
  }
  viewer.deselectAll();
  super.execute();
  EditPart processPart=(EditPart)viewer.getRootEditPart().getChildren().get(0);
  if (processPart instanceof ProcessPart) {
    List<EditPart> sel=new ArrayList<EditPart>();
    for (    EditPart editPart : (List<EditPart>)processPart.getChildren()) {
      if (editPart instanceof NodePart) {
        Node currentNode=(Node)editPart.getModel();
        if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer())) {
          sel.add(editPart);
        }
      }
 else       if (editPart instanceof NoteEditPart) {
        Note currentNode=(Note)editPart.getModel();
        if (noteCmd.getNoteList().contains(currentNode)) {
          sel.add(editPart);
        }
      }
 else       if (editPart instanceof SubjobContainerPart) {
        for (        EditPart subjobChildsPart : (List<EditPart>)editPart.getChildren()) {
          if (subjobChildsPart instanceof NodeContainerPart) {
            if (nodeCmd.getNodeContainerList().contains(((NodeContainerPart)subjobChildsPart).getModel())) {
              NodePart nodePart=((NodeContainerPart)subjobChildsPart).getNodePart();
              if (nodePart != null) {
                sel.add(nodePart);
              }
            }
          }
        }
      }
    }
    StructuredSelection s=new StructuredSelection(sel);
    viewer.setSelection(s);
  }
}
Program: 123863
Project: 123863
Buggy source:
protected Command createAddCommand(final EditPart child,final Object constraint){
  if (child instanceof NodePart) {
    if (((Node)child.getModel()).isReadOnly()) {
      return null;
    }
    MoveNodeCommand locationCommand=new MoveNodeCommand((Node)child.getModel(),((Rectangle)constraint).getLocation());
    return locationCommand;
  }
  return null;
}

Fixed version (ground truth):
protected Command createAddCommand(final EditPart child,final Object constraint){
  if (child instanceof NodePart) {
    if (((Node)child.getModel()).isReadOnly()) {
      return null;
    }
    MoveNodeCommand locationCommand=new MoveNodeCommand((Node)child.getModel(),((Rectangle)constraint).getLocation());
    return locationCommand;
  }
  if (child instanceof NoteEditPart) {
    if (((Note)child.getModel()).isReadOnly()) {
      return null;
    }
    MoveNoteCommand locationCommand=new MoveNoteCommand((Note)child.getModel(),((Rectangle)constraint).getLocation());
    return locationCommand;
  }
  return null;
}
Program: 123864
Project: 123864
Buggy source:
@Override public void execute(){
  AbstractMultiPageTalendEditor multiPageTalendEditor=(AbstractMultiPageTalendEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
  GraphicalViewer viewer=multiPageTalendEditor.getTalendEditor().getViewer();
  oldSelection=new ArrayList<EditPart>();
  for (  EditPart editPart : (List<EditPart>)viewer.getSelectedEditParts()) {
    oldSelection.add(editPart);
  }
  viewer.deselectAll();
  super.execute();
  EditPart processPart=(EditPart)viewer.getRootEditPart().getChildren().get(0);
  if (processPart instanceof ProcessPart) {
    List<EditPart> sel=new ArrayList<EditPart>();
    for (    EditPart editPart : (List<EditPart>)processPart.getChildren()) {
      if (editPart instanceof NodePart) {
        Node currentNode=(Node)editPart.getModel();
        if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer())) {
          sel.add(editPart);
        }
      }
 else       if (editPart instanceof NoteEditPart) {
        Note currentNode=(Note)editPart.getModel();
        if (noteCmd.getNoteList().contains(currentNode)) {
          sel.add(editPart);
        }
      }
    }
    StructuredSelection s=new StructuredSelection(sel);
    viewer.setSelection(s);
  }
}

Fixed version (ground truth):
@Override public void execute(){
  AbstractMultiPageTalendEditor multiPageTalendEditor=(AbstractMultiPageTalendEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
  GraphicalViewer viewer=multiPageTalendEditor.getTalendEditor().getViewer();
  oldSelection=new ArrayList<EditPart>();
  for (  EditPart editPart : (List<EditPart>)viewer.getSelectedEditParts()) {
    oldSelection.add(editPart);
  }
  viewer.deselectAll();
  super.execute();
  EditPart processPart=(EditPart)viewer.getRootEditPart().getChildren().get(0);
  if (processPart instanceof ProcessPart) {
    List<EditPart> sel=new ArrayList<EditPart>();
    for (    EditPart editPart : (List<EditPart>)processPart.getChildren()) {
      if (editPart instanceof NodePart) {
        Node currentNode=(Node)editPart.getModel();
        if (nodeCmd.getNodeContainerList().contains(currentNode.getNodeContainer())) {
          sel.add(editPart);
        }
      }
 else       if (editPart instanceof NoteEditPart) {
        Note currentNode=(Note)editPart.getModel();
        if (noteCmd.getNoteList().contains(currentNode)) {
          sel.add(editPart);
        }
      }
 else       if (editPart instanceof SubjobContainerPart) {
        for (        EditPart subjobChildsPart : (List<EditPart>)editPart.getChildren()) {
          if (subjobChildsPart instanceof NodeContainerPart) {
            if (nodeCmd.getNodeContainerList().contains(((NodeContainerPart)subjobChildsPart).getModel())) {
              NodePart nodePart=((NodeContainerPart)subjobChildsPart).getNodePart();
              if (nodePart != null) {
                sel.add(nodePart);
              }
            }
          }
        }
      }
    }
    StructuredSelection s=new StructuredSelection(sel);
    viewer.setSelection(s);
  }
}
Program: 123865
Project: 123865
Buggy source:
protected Command createAddCommand(final EditPart child,final Object constraint){
  if (child instanceof NodePart) {
    if (((Node)child.getModel()).isReadOnly()) {
      return null;
    }
    MoveNodeCommand locationCommand=new MoveNodeCommand((Node)child.getModel(),((Rectangle)constraint).getLocation());
    return locationCommand;
  }
  return null;
}

Fixed version (ground truth):
protected Command createAddCommand(final EditPart child,final Object constraint){
  if (child instanceof NodePart) {
    if (((Node)child.getModel()).isReadOnly()) {
      return null;
    }
    MoveNodeCommand locationCommand=new MoveNodeCommand((Node)child.getModel(),((Rectangle)constraint).getLocation());
    return locationCommand;
  }
  if (child instanceof NoteEditPart) {
    if (((Note)child.getModel()).isReadOnly()) {
      return null;
    }
    MoveNoteCommand locationCommand=new MoveNoteCommand((Note)child.getModel(),((Rectangle)constraint).getLocation());
    return locationCommand;
  }
  return null;
}
Program: 123866
Project: 123866
Buggy source:
/** 
 * Create the child node of the input node
 * @param node
 */
private void createChildNode(FOXTreeNode node){
  String label="String_Node_Str";
  while (!org.talend.repository.ui.wizards.metadata.connection.files.xml.util.StringUtil.validateLabelForXML(label)) {
    InputDialog dialog=new InputDialog(null,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",null);
    int status=dialog.open();
    if (status == InputDialog.OK) {
      label=dialog.getValue().trim();
    }
    if (status == InputDialog.CANCEL) {
      return;
    }
  }
  FOXTreeNode child=new Attribute(label);
  child.setRow(node.getRow());
  node.addChild(child);
  this.xmlViewer.refresh();
  xmlViewer.expandAll();
  foxui.redrawLinkers();
}

Fixed version (ground truth):
/** 
 * Create the child node of the input node
 * @param node
 */
private void createChildNode(FOXTreeNode node){
  String label="String_Node_Str";
  while (!org.talend.repository.ui.wizards.metadata.connection.files.xml.util.StringUtil.validateLabelForXML(label)) {
    final List<FOXTreeNode> nodes=node.getChildren();
    InputDialog dialog=new InputDialog(null,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",new IInputValidator(){
      @Override public String isValid(      String newText){
        for (int i=0; i < nodes.size(); i++) {
          if (newText.trim().equals(nodes.get(i).getLabel())) {
            return "String_Node_Str";
          }
        }
        return null;
      }
    }
);
    int status=dialog.open();
    if (status == InputDialog.OK) {
      label=dialog.getValue().trim();
    }
    if (status == InputDialog.CANCEL) {
      return;
    }
  }
  FOXTreeNode child=new Attribute(label);
  child.setRow(node.getRow());
  node.addChild(child);
  this.xmlViewer.refresh();
  xmlViewer.expandAll();
  foxui.redrawLinkers();
}
Program: 123867
Project: 123867
Buggy source:
/** 
 * Create the child node of the input node
 * @param node
 */
private boolean createChildNode(FOXTreeNode node){
  if (node.getColumn() != null) {
    if (!MessageDialog.openConfirm(xmlViewer.getControl().getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + node.getLabel() + "String_Node_Str")) {
      return false;
    }
    node.setColumn(null);
  }
  String label="String_Node_Str";
  while (!StringUtil.validateLabelForXML(label)) {
    InputDialog dialog=new InputDialog(null,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",null);
    int status=dialog.open();
    if (status == InputDialog.OK) {
      label=dialog.getValue().trim();
    }
    if (status == InputDialog.CANCEL) {
      return false;
    }
  }
  FOXTreeNode child=new Element(label);
  child.setRow(node.getRow());
  node.addChild(child);
  this.xmlViewer.refresh();
  this.xmlViewer.expandAll();
  return true;
}

Fixed version (ground truth):
/** 
 * Create the child node of the input node
 * @param node
 */
private boolean createChildNode(FOXTreeNode node){
  if (node.getColumn() != null) {
    if (!MessageDialog.openConfirm(xmlViewer.getControl().getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str") + node.getLabel() + "String_Node_Str")) {
      return false;
    }
    node.setColumn(null);
  }
  String label="String_Node_Str";
  while (!StringUtil.validateLabelForXML(label)) {
    final List<FOXTreeNode> nodes=node.getChildren();
    InputDialog dialog=new InputDialog(null,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),"String_Node_Str",new IInputValidator(){
      @Override public String isValid(      String newText){
        for (int i=0; i < nodes.size(); i++) {
          if (newText.trim().equals(nodes.get(i).getLabel())) {
            return "String_Node_Str";
          }
        }
        return null;
      }
    }
);
    int status=dialog.open();
    if (status == InputDialog.OK) {
      label=dialog.getValue().trim();
    }
    if (status == InputDialog.CANCEL) {
      return false;
    }
  }
  FOXTreeNode child=new Element(label);
  child.setRow(node.getRow());
  node.addChild(child);
  this.xmlViewer.refresh();
  this.xmlViewer.expandAll();
  return true;
}
Program: 123868
Project: 123868
Buggy source:
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  tPaloDimensionElements tPaloDimele=null;
  int elementPosition=0;
  String elementName="String_Node_Str";
  int elementParentPosition=0;
  int elementLevel=0;
  for (  paloelement plElm : pleles.getElements()) {
    elementPosition=(int)plElm.getElementPosition();
    elementName=plElm.getName();
    elementParentPosition=(int)plElm.getFatherPaloelement().getElementPosition();
    if (elementParentPosition == 0 && elementPosition == 0) {
      elementParentPosition=-1;
    }
    elementLevel=getElementLevel(elementName,elementPosition);
    tPaloDimele=new tPaloDimensionElements(elementPosition,elementName,elementParentPosition,elementLevel);
    lstPaloDimensionElements.add(tPaloDimele);
  }
}

Fixed version (ground truth):
/** 
 * get all existing elements and pass for the addMainInToTransformList() method
 * @param pleles
 * @return
 * @throws paloexception
 */
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  maxDepthElement(pleles);
  String[] arr=null;
  paths=new HashMap<String,List<List>>();
  for (  paloelement plElm : pleles.getElements()) {
    if (plElm.getElementParents() == null) {
      List elementPaths=new ArrayList<List>();
      List path=new ArrayList<String>();
      elementPaths.add(path);
      path.add(plElm.getName());
      paths.put(plElm.getName(),elementPaths);
      collectionPaths(pleles,plElm,elementPaths,path);
    }
  }
  for (  String key : paths.keySet()) {
    List<List> elementPaths=paths.get(key);
    for (    List<String> path : elementPaths) {
      arr=new String[maxDepth];
      for (int i=0; i < path.size(); i++) {
        arr[i]=path.get(i);
      }
      addMainInToTransformList(arr);
    }
  }
}
Program: 123869
Project: 123869
Buggy source:
public void buildParentChildRelationShipReferenced(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < 2; i++) {
      boolean bFound=false;
      for (      tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
        if (tParentDimensionElement.getElementName().equals(strMainIn[i])) {
          bFound=true;
          break;
        }
      }
      if (!bFound) {
        int iLevel=getElementLevel(strMainIn[0],0);
        double dFactor=1;
        if (strMainIn.length == 3 && i == 1) {
          try {
            dFactor=Double.parseDouble(strMainIn[2]);
          }
 catch (          Exception e) {
          }
        }
        tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],-1,iLevel,dFactor);
        lstPaloDimensionElements.add(tDimensionElement);
        iPosition++;
      }
    }
  }
  for (  String[] strMainIn : lstTalendMainIn) {
    for (    tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
      if (tParentDimensionElement.getElementName().equals(strMainIn[0])) {
        tPaloDimensionElements actElem=getDimenionElement(strMainIn[1]);
        if (null != actElem) {
          actElem.setLevel(tParentDimensionElement.getLevel() + 1);
          actElem.setParentPosition(tParentDimensionElement.getPosition());
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
public void buildParentChildRelationShipReferenced(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < 2; i++) {
      boolean bFound=false;
      for (      tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
        if (tParentDimensionElement.getElementName() != null && tParentDimensionElement.getElementName().equals(strMainIn[i])) {
          bFound=true;
          break;
        }
      }
      if (!bFound) {
        int iLevel=getElementLevel(strMainIn[0],0);
        double dFactor=1;
        if (strMainIn.length == 3 && i == 1) {
          try {
            dFactor=Double.parseDouble(strMainIn[2]);
          }
 catch (          Exception e) {
          }
        }
        tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],-1,iLevel,dFactor);
        lstPaloDimensionElements.add(tDimensionElement);
        iPosition++;
      }
    }
  }
  for (  String[] strMainIn : lstTalendMainIn) {
    for (    tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
      if (tParentDimensionElement.getElementName() != null && tParentDimensionElement.getElementName().equals(strMainIn[0])) {
        tPaloDimensionElements actElem=getDimenionElement(strMainIn[1]);
        if (null != actElem) {
          actElem.setLevel(tParentDimensionElement.getLevel() + 1);
          actElem.setParentPosition(tParentDimensionElement.getPosition());
        }
        break;
      }
    }
  }
}
Program: 123870
Project: 123870
Buggy source:
public void buildParentChildRelationShipNormal(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < strMainIn.length; i++) {
      boolean bElemenExists=false;
      for (      tPaloDimensionElements tDimensionElement : lstPaloDimensionElements) {
        if (tDimensionElement.getElementName().equals(strMainIn[i])) {
          bElemenExists=true;
          break;
        }
      }
      int iParentPosition=-1;
      if (i > 0) {
        for (        tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
          if (tParentDimensionElement.getElementName().equals(strMainIn[i - 1])) {
            iParentPosition=tParentDimensionElement.getPosition();
            break;
          }
        }
      }
      tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],iParentPosition,i);
      lstPaloDimensionElements.add(tDimensionElement);
      iPosition++;
    }
  }
}

Fixed version (ground truth):
public void buildParentChildRelationShipNormal(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < strMainIn.length; i++) {
      boolean bElemenExists=false;
      for (      tPaloDimensionElements tDimensionElement : lstPaloDimensionElements) {
        if (tDimensionElement.getElementName() != null && tDimensionElement.getElementName().equals(strMainIn[i])) {
          bElemenExists=true;
          break;
        }
      }
      int iParentPosition=-1;
      if (i > 0) {
        for (        tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
          if (tParentDimensionElement.getElementName() != null && tParentDimensionElement.getElementName().equals(strMainIn[i - 1])) {
            iParentPosition=tParentDimensionElement.getPosition();
            break;
          }
        }
      }
      tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],iParentPosition,i);
      lstPaloDimensionElements.add(tDimensionElement);
      iPosition++;
    }
  }
}
Program: 123871
Project: 123871
Buggy source:
public void buildConsolidationNormal(paloelements paloElements,String strElementName,int iParentPosition) throws paloexception {
  boolean bConsolidationElementsFound=false;
  paloconsolidations paloCons=new paloconsolidations();
  for (  tPaloDimensionElements tConsElement : lstPaloDimensionElements) {
    if (tConsElement.getParentPosition() == iParentPosition && !tConsElement.getElementName().equals(strElementName)) {
      paloCons.addElementToConsolidation(paloElements.getElement(tConsElement.getElementName()),tConsElement.getFactor());
      bConsolidationElementsFound=true;
    }
  }
  if (bConsolidationElementsFound) {
    paloElements.getElement(strElementName).updateElement(paloCons,true);
  }
}

Fixed version (ground truth):
public void buildConsolidationNormal(paloelements paloElements,String strElementName,int iParentPosition) throws paloexception {
  boolean bConsolidationElementsFound=false;
  paloconsolidations paloCons=new paloconsolidations();
  for (  tPaloDimensionElements tConsElement : lstPaloDimensionElements) {
    if (tConsElement.getParentPosition() == iParentPosition && tConsElement.getElementName() != null && !tConsElement.getElementName().equals(strElementName)) {
      paloCons.addElementToConsolidation(paloElements.getElement(tConsElement.getElementName()),tConsElement.getFactor());
      bConsolidationElementsFound=true;
    }
  }
  if (bConsolidationElementsFound) {
    paloElements.getElement(strElementName).updateElement(paloCons,true);
  }
}
Program: 123872
Project: 123872
Buggy source:
public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
public void renameInputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  InputXmlTree inputTree : externalEmfData.getInputTrees()) {
    if (inputTree.getName() != null && inputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      inputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,inputTree.getNodes(),inputTree.getName(),1);
    }
  }
}
Program: 123873
Project: 123873
Buggy source:
public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}

Fixed version (ground truth):
public void renameOutputConnection(String oldName,String newName){
  XmlMapData externalEmfData=(XmlMapData)getExternalEmfData();
  for (  OutputXmlTree outputTree : externalEmfData.getOutputTrees()) {
    if (outputTree.getName() != null && outputTree.getName().equals(oldName) && !oldName.equals(newName)) {
      outputTree.setName(newName);
      XmlMapUtil.updateXPathAndExpression(externalEmfData,outputTree.getNodes(),outputTree.getName(),1);
    }
  }
}
Program: 123882
Project: 123882
Buggy source:
protected String getRepositoryItemFromRepositoryName(IElementParameter param,String repositoryName){
  String value=(String)param.getValue();
  Object[] valuesList=param.getListItemsValue();
  String[] originalList=param.getListItemsDisplayName();
  for (int i=0; i < valuesList.length; i++) {
    if (valuesList[i].equals(value)) {
      if ("String_Node_Str".equals(repositoryName)) {
        return valuesList[i].toString();
      }
      return originalList[i];
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected String getRepositoryItemFromRepositoryName(IElementParameter param,String repositoryName){
  String value=(String)param.getValue();
  Object[] valuesList=param.getListItemsValue();
  String[] originalList=param.getListItemsDisplayCodeName();
  for (int i=0; i < valuesList.length; i++) {
    if (valuesList[i].equals(value)) {
      if ("String_Node_Str".equals(repositoryName)) {
        return valuesList[i].toString();
      }
      return originalList[i];
    }
  }
  return "String_Node_Str";
}
Program: 123883
Project: 123883
Buggy source:
protected String getRepositoryItemFromRepositoryName(IElementParameter param,String repositoryName){
  String value=(String)param.getValue();
  Object[] valuesList=param.getListItemsValue();
  String[] originalList=param.getListItemsDisplayName();
  for (int i=0; i < valuesList.length; i++) {
    if (valuesList[i].equals(value)) {
      if ("String_Node_Str".equals(repositoryName)) {
        return valuesList[i].toString();
      }
      return originalList[i];
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected String getRepositoryItemFromRepositoryName(IElementParameter param,String repositoryName){
  String value=(String)param.getValue();
  Object[] valuesList=param.getListItemsValue();
  String[] originalList=param.getListItemsDisplayCodeName();
  for (int i=0; i < valuesList.length; i++) {
    if (valuesList[i].equals(value)) {
      if ("String_Node_Str".equals(repositoryName)) {
        return valuesList[i].toString();
      }
      return originalList[i];
    }
  }
  return "String_Node_Str";
}
Program: 123885
Project: 123885
Buggy source:
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  tPaloDimensionElements tPaloDimele=null;
  int elementPosition=0;
  String elementName="String_Node_Str";
  int elementParentPosition=0;
  int elementLevel=0;
  for (  paloelement plElm : pleles.getElements()) {
    elementPosition=(int)plElm.getElementPosition();
    elementName=plElm.getName();
    elementParentPosition=(int)plElm.getFatherPaloelement().getElementPosition();
    if (elementParentPosition == 0 && elementPosition == 0) {
      elementParentPosition=-1;
    }
    elementLevel=getElementLevel(elementName,elementPosition);
    tPaloDimele=new tPaloDimensionElements(elementPosition,elementName,elementParentPosition,elementLevel);
    lstPaloDimensionElements.add(tPaloDimele);
  }
}

Fixed version (ground truth):
/** 
 * get all existing elements and pass for the addMainInToTransformList() method
 * @param pleles
 * @return
 * @throws paloexception
 */
public void getAllExistPaloDimensionElements(paloelements pleles) throws paloexception {
  maxDepthElement(pleles);
  String[] arr=null;
  paths=new HashMap<String,List<List>>();
  for (  paloelement plElm : pleles.getElements()) {
    if (plElm.getElementParents() == null) {
      List elementPaths=new ArrayList<List>();
      List path=new ArrayList<String>();
      elementPaths.add(path);
      path.add(plElm.getName());
      paths.put(plElm.getName(),elementPaths);
      collectionPaths(pleles,plElm,elementPaths,path);
    }
  }
  for (  String key : paths.keySet()) {
    List<List> elementPaths=paths.get(key);
    for (    List<String> path : elementPaths) {
      arr=new String[maxDepth];
      for (int i=0; i < path.size(); i++) {
        arr[i]=path.get(i);
      }
      addMainInToTransformList(arr);
    }
  }
}
Program: 123886
Project: 123886
Buggy source:
public void buildParentChildRelationShipReferenced(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < 2; i++) {
      boolean bFound=false;
      for (      tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
        if (tParentDimensionElement.getElementName().equals(strMainIn[i])) {
          bFound=true;
          break;
        }
      }
      if (!bFound) {
        int iLevel=getElementLevel(strMainIn[0],0);
        double dFactor=1;
        if (strMainIn.length == 3 && i == 1) {
          try {
            dFactor=Double.parseDouble(strMainIn[2]);
          }
 catch (          Exception e) {
          }
        }
        tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],-1,iLevel,dFactor);
        lstPaloDimensionElements.add(tDimensionElement);
        iPosition++;
      }
    }
  }
  for (  String[] strMainIn : lstTalendMainIn) {
    for (    tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
      if (tParentDimensionElement.getElementName().equals(strMainIn[0])) {
        tPaloDimensionElements actElem=getDimenionElement(strMainIn[1]);
        if (null != actElem) {
          actElem.setLevel(tParentDimensionElement.getLevel() + 1);
          actElem.setParentPosition(tParentDimensionElement.getPosition());
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
public void buildParentChildRelationShipReferenced(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < 2; i++) {
      boolean bFound=false;
      for (      tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
        if (tParentDimensionElement.getElementName() != null && tParentDimensionElement.getElementName().equals(strMainIn[i])) {
          bFound=true;
          break;
        }
      }
      if (!bFound) {
        int iLevel=getElementLevel(strMainIn[0],0);
        double dFactor=1;
        if (strMainIn.length == 3 && i == 1) {
          try {
            dFactor=Double.parseDouble(strMainIn[2]);
          }
 catch (          Exception e) {
          }
        }
        tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],-1,iLevel,dFactor);
        lstPaloDimensionElements.add(tDimensionElement);
        iPosition++;
      }
    }
  }
  for (  String[] strMainIn : lstTalendMainIn) {
    for (    tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
      if (tParentDimensionElement.getElementName() != null && tParentDimensionElement.getElementName().equals(strMainIn[0])) {
        tPaloDimensionElements actElem=getDimenionElement(strMainIn[1]);
        if (null != actElem) {
          actElem.setLevel(tParentDimensionElement.getLevel() + 1);
          actElem.setParentPosition(tParentDimensionElement.getPosition());
        }
        break;
      }
    }
  }
}
Program: 123887
Project: 123887
Buggy source:
public void buildParentChildRelationShipNormal(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < strMainIn.length; i++) {
      boolean bElemenExists=false;
      for (      tPaloDimensionElements tDimensionElement : lstPaloDimensionElements) {
        if (tDimensionElement.getElementName().equals(strMainIn[i])) {
          bElemenExists=true;
          break;
        }
      }
      int iParentPosition=-1;
      if (i > 0) {
        for (        tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
          if (tParentDimensionElement.getElementName().equals(strMainIn[i - 1])) {
            iParentPosition=tParentDimensionElement.getPosition();
            break;
          }
        }
      }
      tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],iParentPosition,i);
      lstPaloDimensionElements.add(tDimensionElement);
      iPosition++;
    }
  }
}

Fixed version (ground truth):
public void buildParentChildRelationShipNormal(){
  int iPosition=0;
  for (  String[] strMainIn : lstTalendMainIn) {
    for (int i=0; i < strMainIn.length; i++) {
      boolean bElemenExists=false;
      for (      tPaloDimensionElements tDimensionElement : lstPaloDimensionElements) {
        if (tDimensionElement.getElementName() != null && tDimensionElement.getElementName().equals(strMainIn[i])) {
          bElemenExists=true;
          break;
        }
      }
      int iParentPosition=-1;
      if (i > 0) {
        for (        tPaloDimensionElements tParentDimensionElement : lstPaloDimensionElements) {
          if (tParentDimensionElement.getElementName() != null && tParentDimensionElement.getElementName().equals(strMainIn[i - 1])) {
            iParentPosition=tParentDimensionElement.getPosition();
            break;
          }
        }
      }
      tPaloDimensionElements tDimensionElement=new tPaloDimensionElements(iPosition,strMainIn[i],iParentPosition,i);
      lstPaloDimensionElements.add(tDimensionElement);
      iPosition++;
    }
  }
}
Program: 123888
Project: 123888
Buggy source:
public void buildConsolidationNormal(paloelements paloElements,String strElementName,int iParentPosition) throws paloexception {
  boolean bConsolidationElementsFound=false;
  paloconsolidations paloCons=new paloconsolidations();
  for (  tPaloDimensionElements tConsElement : lstPaloDimensionElements) {
    if (tConsElement.getParentPosition() == iParentPosition && !tConsElement.getElementName().equals(strElementName)) {
      paloCons.addElementToConsolidation(paloElements.getElement(tConsElement.getElementName()),tConsElement.getFactor());
      bConsolidationElementsFound=true;
    }
  }
  if (bConsolidationElementsFound) {
    paloElements.getElement(strElementName).updateElement(paloCons,true);
  }
}

Fixed version (ground truth):
public void buildConsolidationNormal(paloelements paloElements,String strElementName,int iParentPosition) throws paloexception {
  boolean bConsolidationElementsFound=false;
  paloconsolidations paloCons=new paloconsolidations();
  for (  tPaloDimensionElements tConsElement : lstPaloDimensionElements) {
    if (tConsElement.getParentPosition() == iParentPosition && tConsElement.getElementName() != null && !tConsElement.getElementName().equals(strElementName)) {
      paloCons.addElementToConsolidation(paloElements.getElement(tConsElement.getElementName()),tConsElement.getFactor());
      bConsolidationElementsFound=true;
    }
  }
  if (bConsolidationElementsFound) {
    paloElements.getElement(strElementName).updateElement(paloCons,true);
  }
}
Program: 123889
Project: 123889
Buggy source:
/** 
 * Parse the XML file. Buffer the result in LoopEntry.
 * @param is InputStream
 */
public void parse(java.io.InputStream is,String charset){
  this.charset=charset;
  try {
    DefaultHandler hd=null;
    SAXParser saxParser=SAXParserFactory.newInstance().newSAXParser();
    if (rootPath == null || rootPath.equals("String_Node_Str")) {
      hd=newHandler();
    }
 else {
      hd=newHandler2();
    }
    saxParser.setProperty("String_Node_Str",hd);
    org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(is);
    inSource.setEncoding(this.charset);
    saxParser.parse(is,hd);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Parse the XML file. Buffer the result in LoopEntry.
 * @param is InputStream
 */
public void parse(java.io.InputStream is,String charset){
  this.charset=charset;
  try {
    DefaultHandler hd=null;
    SAXParser saxParser=SAXParserFactory.newInstance().newSAXParser();
    if (rootPath == null || rootPath.equals("String_Node_Str")) {
      hd=newHandler();
    }
 else {
      hd=newHandler2();
    }
    saxParser.setProperty("String_Node_Str",hd);
    org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(is,this.charset));
    saxParser.parse(is,hd);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 123890
Project: 123890
Buggy source:
public Object call() throws Exception {
  try {
    DefaultHandler hd=new SimpleSAXLoopHandler(nodes,bcache);
    SAXParser saxParser=null;
    if (!ignoreDTD) {
      saxParser=SAXParserFactory.newInstance().newSAXParser();
    }
 else {
      SAXParserFactory spf=SAXParserFactory.newInstance();
      spf.setFeature("String_Node_Str",false);
      saxParser=spf.newSAXParser();
    }
    saxParser.setProperty("String_Node_Str",hd);
    if (fileURL != null) {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new java.io.FileInputStream(fileURL));
      inSource.setEncoding(this.charset);
      saxParser.parse(inSource,hd);
    }
 else {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(is);
      inSource.setEncoding(this.charset);
      saxParser.parse(is,hd);
    }
  }
  finally {
    bcache.notifyErrorOccurred();
  }
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  try {
    DefaultHandler hd=new SimpleSAXLoopHandler(nodes,bcache);
    SAXParser saxParser=null;
    if (!ignoreDTD) {
      saxParser=SAXParserFactory.newInstance().newSAXParser();
    }
 else {
      SAXParserFactory spf=SAXParserFactory.newInstance();
      spf.setFeature("String_Node_Str",false);
      saxParser=spf.newSAXParser();
    }
    saxParser.setProperty("String_Node_Str",hd);
    if (fileURL != null) {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(new java.io.FileInputStream(fileURL),this.charset));
      saxParser.parse(inSource,hd);
    }
 else {
      org.xml.sax.InputSource inSource=new org.xml.sax.InputSource(new UnicodeReader(is,this.charset));
      saxParser.parse(is,hd);
    }
  }
  finally {
    bcache.notifyErrorOccurred();
  }
  return null;
}
Program: 123894
Project: 123894
Buggy source:
/** 
 * DOC YeXiaowei Comment method "createSalesforceSchemaWizard".
 * @param selection
 * @param forceReadOnly
 */
public void createSalesforceSchemasWizard(RepositoryNode node,final boolean forceReadOnly){
  SalesforceSchemaConnection connection=null;
  MetadataTable metadataTable=null;
  boolean creation=false;
  if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
    ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
    String tableLabel=(String)node.getProperties(EProperties.LABEL);
    SalesforceSchemaConnectionItem item=null;
    if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_MODULE) {
      item=(SalesforceSchemaConnectionItem)node.getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=ConnectionFactory.eINSTANCE.createMetadataTable();
      String nextId=ProxyRepositoryFactory.getInstance().getNextId();
      metadataTable.setId(nextId);
      metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));
      creation=false;
    }
 else {
      return;
    }
    initContextMode(item);
    SalesforceSchemasWizard salesforceSchemasWizard=new SalesforceSchemasWizard(PlatformUI.getWorkbench(),creation,node.getObject(),metadataTable,getExistingNames(),forceReadOnly,null,null,node.getProperties(EProperties.LABEL).toString());
    WizardDialog wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),salesforceSchemasWizard);
    handleWizard(node,wizardDialog);
  }
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "createSalesforceSchemaWizard".
 * @param selection
 * @param forceReadOnly
 */
public void createSalesforceSchemasWizard(RepositoryNode node,final boolean forceReadOnly){
  SalesforceSchemaConnection connection=null;
  MetadataTable metadataTable=null;
  boolean creation=false;
  if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {
    ERepositoryObjectType nodeType=(ERepositoryObjectType)node.getProperties(EProperties.CONTENT_TYPE);
    String tableLabel=(String)node.getProperties(EProperties.LABEL);
    SalesforceSchemaConnectionItem item=null;
    if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_MODULE) {
      item=(SalesforceSchemaConnectionItem)node.getObject().getProperty().getItem();
      connection=(SalesforceSchemaConnection)item.getConnection();
      metadataTable=TableHelper.findByLabel(connection,tableLabel);
      creation=false;
    }
 else {
      return;
    }
    initContextMode(item);
    if (metadataTable.eContainer() instanceof SalesforceModuleUnit) {
      SalesforceModuleUnit unit=(SalesforceModuleUnit)metadataTable.eContainer();
      connection.setModuleName(unit.getModuleName());
    }
    SalesforceSchemasWizard salesforceSchemasWizard=new SalesforceSchemasWizard(PlatformUI.getWorkbench(),creation,node.getObject(),metadataTable,getExistingNames(),forceReadOnly,null,null,node.getProperties(EProperties.LABEL).toString());
    WizardDialog wizardDialog=new WizardDialog(Display.getCurrent().getActiveShell(),salesforceSchemasWizard);
    handleWizard(node,wizardDialog);
  }
}