nus-yam/ex-repair huggingface dataset:
Program: 119779
Project: 119779
Buggy source:
/** 
 * DOC hcyi Comment method "checkHasMultiPrejobOrPostJobComponents".
 */
private void checkHasMultiPrejobOrPostJobComponents(){
  if (PluginChecker.isJobLetPluginLoaded()) {
    IJobletProviderService jobletService=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
    if (jobletService != null) {
      if (jobletService.isJobletComponent(this)) {
        Map<String,INode> multiNodes=new HashMap<String,INode>();
        for (        INode proGraphicNode : process.getGraphicalNodes()) {
          boolean jobletComponent=jobletService.isJobletComponent(proGraphicNode);
          if (jobletComponent) {
            for (            INode node : jobletService.getGraphNodesForJoblet(proGraphicNode)) {
              if (("String_Node_Str").equals(node.getUniqueName())) {
                continue;
              }
              checktPreOrPost(multiNodes,node);
            }
          }
 else {
            if (("String_Node_Str").equals(proGraphicNode.getUniqueName())) {
              continue;
            }
            checktPreOrPost(multiNodes,proGraphicNode);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC hcyi Comment method "checkHasMultiPrejobOrPostJobComponents".
 */
private void checkHasMultiPrejobOrPostJobComponents(){
  Map<String,INode> multiNodes=new HashMap<String,INode>();
  if (PluginChecker.isJobLetPluginLoaded()) {
    IJobletProviderService jobletService=(IJobletProviderService)GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);
    if (jobletService != null) {
      List<INode> joblets=new ArrayList<INode>();
      for (      INode proGraphicNode : process.getGraphicalNodes()) {
        boolean jobletComponent=jobletService.isJobletComponent(proGraphicNode);
        if (jobletComponent) {
          joblets.add(proGraphicNode);
        }
 else {
          if (("String_Node_Str").equals(proGraphicNode.getUniqueName())) {
            continue;
          }
          checktPreOrPost(multiNodes,proGraphicNode);
        }
      }
      for (      INode jNode : joblets) {
        for (        INode node : jobletService.getGraphNodesForJoblet(jNode)) {
          if (("String_Node_Str").equals(node.getUniqueName())) {
            continue;
          }
          checktPreOrPost(multiNodes,node);
        }
      }
    }
  }
}
Program: 119780
Project: 119780
Buggy source:
private void create() throws MessageQueueException {
  if (!(host == null || "String_Node_Str".equals(host) || "String_Node_Str".equalsIgnoreCase(host) || host.equals(ipAddr) || LOCALIP.equals(host))) {
    throw new MessageQueueException("String_Node_Str",-1);
  }
  String fullname="String_Node_Str" + queueType + "String_Node_Str"+ queueName;
  String qLabel="String_Node_Str" + this.getClass().getName() + "String_Node_Str";
  msmqHandle=Queue.create(fullname,qLabel,isTransaction);
}

Fixed version (ground truth):
private void create() throws MessageQueueException {
  if (!(host == null || "String_Node_Str".equals(host) || "String_Node_Str".equalsIgnoreCase(host) || host.equals(ipAddr) || LOCALIP.equals(host))) {
    throw new MessageQueueException("String_Node_Str",-1);
  }
  String fullname="String_Node_Str" + queueType + "String_Node_Str"+ queueName;
  String qLabel="String_Node_Str" + this.getClass().getName() + "String_Node_Str";
  msmqHandle=Queue.create(fullname,qLabel,isTransaction);
  System.out.println("String_Node_Str" + fullname + "String_Node_Str");
}
Program: 119781
Project: 119781
Buggy source:
public void open() throws MessageQueueException {
  try {
    if (msmqHandle != null) {
      msmqHandle.close();
      msmqHandle=null;
    }
    String fullname=getQueueFullName(host,queueName);
    msmqHandle=new Queue(fullname);
  }
 catch (  MessageQueueException ex1) {
    if (createIfNotExists) {
      System.out.println("String_Node_Str" + ex1);
      createIfNotExists=false;
      create();
    }
 else {
      throw ex1;
    }
  }
}

Fixed version (ground truth):
public void open() throws MessageQueueException {
  try {
    if (msmqHandle != null) {
      msmqHandle.close();
      msmqHandle=null;
    }
    String fullname=getQueueFullName(host,queueName);
    msmqHandle=new Queue(fullname);
  }
 catch (  MessageQueueException ex1) {
    if (createIfNotExists) {
      System.out.println("String_Node_Str" + queueType + "String_Node_Str"+ queueName+ "String_Node_Str"+ ex1);
      createIfNotExists=false;
      create();
    }
 else {
      throw ex1;
    }
  }
}
Program: 119782
Project: 119782
Buggy source:
private void create() throws MessageQueueException {
  if (!(host == null || "String_Node_Str".equals(host) || "String_Node_Str".equalsIgnoreCase(host) || host.equals(ipAddr) || LOCALIP.equals(host))) {
    throw new MessageQueueException("String_Node_Str",-1);
  }
  String fullname="String_Node_Str" + queueName;
  String qLabel="String_Node_Str" + this.getClass().getName() + "String_Node_Str";
  boolean transactional=false;
  msmqHandle=Queue.create(fullname,qLabel,transactional);
}

Fixed version (ground truth):
private void create() throws MessageQueueException {
  if (!(host == null || "String_Node_Str".equals(host) || "String_Node_Str".equalsIgnoreCase(host) || host.equals(ipAddr) || LOCALIP.equals(host))) {
    throw new MessageQueueException("String_Node_Str",-1);
  }
  String fullname="String_Node_Str" + queueName;
  String qLabel="String_Node_Str" + this.getClass().getName() + "String_Node_Str";
  boolean transactional=false;
  msmqHandle=Queue.create(fullname,qLabel,transactional);
  System.out.println("String_Node_Str" + fullname + "String_Node_Str");
}
Program: 119783
Project: 119783
Buggy source:
public void open() throws MessageQueueException {
  try {
    if (msmqHandle != null) {
      msmqHandle.close();
      msmqHandle=null;
    }
    String fullname=getQueueFullName(host,queueName);
    msmqHandle=new Queue(fullname);
  }
 catch (  MessageQueueException ex1) {
    if (bTried) {
      System.out.println("String_Node_Str" + ex1);
      bTried=false;
      create();
    }
 else {
      throw ex1;
    }
  }
}

Fixed version (ground truth):
public void open() throws MessageQueueException {
  try {
    if (msmqHandle != null) {
      msmqHandle.close();
      msmqHandle=null;
    }
    String fullname=getQueueFullName(host,queueName);
    msmqHandle=new Queue(fullname);
  }
 catch (  MessageQueueException ex1) {
    if (bTried) {
      System.out.println("String_Node_Str" + queueName + "String_Node_Str"+ ex1);
      bTried=false;
      create();
    }
 else {
      throw ex1;
    }
  }
}
Program: 119786
Project: 119786
Buggy source:
public void dragOver(DropTargetEvent event){
  DropTarget dropTarget=(DropTarget)event.getSource();
  Item targetItem=(Item)event.item;
  if (targetItem == null || !isEnabled(event)) {
    event.detail=DND.DROP_NONE;
    return;
  }
  HL7TreeNode targetNode=(HL7TreeNode)(targetItem.getData());
  LocalDraggedData draggedData=LocalDataTransfer.getInstance().getDraggedData();
  List<Object> dragdedData=draggedData.getTransferableEntryList();
  if (dragdedData.size() == 1 && isDropRelatedColumn(event)) {
    if (targetNode instanceof Element) {
      Element element=(Element)targetNode;
      if (!element.getElementChildren().isEmpty() || element.getParent() == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
 else {
      HL7TreeNode parent=targetNode.getParent();
      if (parent == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
  }
  event.detail=DND.DROP_LINK;
}

Fixed version (ground truth):
public void dragOver(DropTargetEvent event){
  DropTarget dropTarget=(DropTarget)event.getSource();
  Item targetItem=(Item)event.item;
  if (targetItem == null) {
    event.detail=DND.DROP_NONE;
    return;
  }
  HL7TreeNode targetNode=(HL7TreeNode)(targetItem.getData());
  LocalDraggedData draggedData=LocalDataTransfer.getInstance().getDraggedData();
  List<Object> dragdedData=draggedData.getTransferableEntryList();
  if (dragdedData.size() == 1 && isDropRelatedColumn(event)) {
    if (targetNode instanceof Element) {
      Element element=(Element)targetNode;
      if (!element.getElementChildren().isEmpty() || element.getParent() == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
 else {
      HL7TreeNode parent=targetNode.getParent();
      if (parent == null) {
        event.detail=DND.DROP_NONE;
        return;
      }
    }
  }
  event.detail=DND.DROP_LINK;
}
Program: 119787
Project: 119787
Buggy source:
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData(currentSchema);
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}

Fixed version (ground truth):
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData("String_Node_Str");
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
        String[] splits=node.getColumnLabel().split("String_Node_Str");
        for (        String s : splits) {
          if (s.equals(column.getLabel())) {
            node.setDefaultValue(null);
            node.setColumn(column);
            break;
          }
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}
Program: 119790
Project: 119790
Buggy source:
public boolean hasChildren(Object element){
  if (element instanceof SchemaTreeNode) {
    return true;
  }
 else   if (element instanceof IMetadataTable) {
    IMetadataTable metadataTable=(IMetadataTable)element;
    List<IMetadataColumn> columns=metadataTable.getListColumns();
    return columns != null && columns.size() > 0;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean hasChildren(Object element){
  if (element instanceof SchemaTreeNode) {
    return true;
  }
 else   if (element instanceof IMetadataTable) {
    IMetadataTable metadataTable=(IMetadataTable)element;
    List<IMetadataColumn> columns=metadataTable.getListColumns();
    return columns != null && columns.size() > 0;
  }
  return false;
}
Program: 119791
Project: 119791
Buggy source:
public String getColumnText(Object element,int columnIndex){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getName();
  }
 else   if (element instanceof IMetadataTable) {
    return ((IMetadataTable)element).getLabel();
  }
 else   if (element instanceof IMetadataColumn) {
    final IMetadataColumn metadataColumn=((IMetadataColumn)element);
    String originalDbColumnName=metadataColumn.getOriginalDbColumnName();
    return originalDbColumnName;
  }
  return null;
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getName();
  }
 else   if (element instanceof IMetadataTable) {
    return ((IMetadataTable)element).getLabel();
  }
 else   if (element instanceof IMetadataColumn) {
    final IMetadataColumn metadataColumn=((IMetadataColumn)element);
    String originalDbColumnName=metadataColumn.getOriginalDbColumnName();
    return originalDbColumnName;
  }
  return null;
}
Program: 119792
Project: 119792
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
@Override public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 119793
Project: 119793
Buggy source:
@SuppressWarnings("String_Node_Str") public void init(){
  selectedNodes.clear();
  Object[] structuredSelection=((IStructuredSelection)treeViewer.getSelection()).toArray();
  for (  Object object : structuredSelection) {
    if (object instanceof MetadataTable) {
      selectedNodes.clear();
      if (((MetadataTable)object).getListColumns().isEmpty()) {
        setEnabled(false);
        return;
      }
      selectedNodes.addAll(((MetadataTable)object).getListColumns());
      break;
    }
    if (object instanceof MetadataColumn) {
      selectedNodes.add((IMetadataColumn)object);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void init(){
  selectedNodes.clear();
  Object[] structuredSelection=((IStructuredSelection)treeViewer.getSelection()).toArray();
  if (structuredSelection.length == 0) {
    setEnabled(false);
    return;
  }
  for (  Object object : structuredSelection) {
    if (object instanceof MetadataTable) {
      selectedNodes.clear();
      if (((MetadataTable)object).getListColumns().isEmpty()) {
        setEnabled(false);
        return;
      }
      selectedNodes.addAll(((MetadataTable)object).getListColumns());
      break;
    }
    if (object instanceof MetadataColumn) {
      selectedNodes.add((IMetadataColumn)object);
    }
  }
}
Program: 119794
Project: 119794
Buggy source:
public Object getParent(Object element){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getParent();
  }
 else   if (element instanceof IMetadataTable) {
    return schemaNode;
  }
  return parentMetadata;
}

Fixed version (ground truth):
@Override public Object getParent(Object element){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getParent();
  }
 else   if (element instanceof IMetadataTable) {
    return schemaNode;
  }
  return parentMetadata;
}
Program: 119795
Project: 119795
Buggy source:
/** 
 * qzhang Comment method "addContextMenu".
 */
private void addContextMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      manager.add(generateSelectAction);
    }
  }
);
  Menu contextMenu=menuMgr.createContextMenu(treeViewer.getTree());
  treeViewer.getTree().setMenu(contextMenu);
}

Fixed version (ground truth):
/** 
 * qzhang Comment method "addContextMenu".
 */
private void addContextMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager manager){
      manager.add(generateSelectAction);
    }
  }
);
  Menu contextMenu=menuMgr.createContextMenu(treeViewer.getTree());
  treeViewer.getTree().setMenu(contextMenu);
}
Program: 119796
Project: 119796
Buggy source:
public Object[] getChildren(Object parentElement){
  return getElements(parentElement);
}

Fixed version (ground truth):
@Override public Object[] getChildren(Object parentElement){
  return getElements(parentElement);
}
Program: 119797
Project: 119797
Buggy source:
public Image getColumnImage(Object element,int columnIndex){
  if (element instanceof IMetadataTable) {
    return tableImage;
  }
 else {
    return columnImage;
  }
}

Fixed version (ground truth):
@Override public Image getColumnImage(Object element,int columnIndex){
  if (element instanceof IMetadataTable) {
    return tableImage;
  }
 else {
    return columnImage;
  }
}
Program: 119798
Project: 119798
Buggy source:
public Object[] getElements(Object inputElement){
  if (inputElement instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)inputElement).getChildren().toArray();
  }
 else   if (inputElement instanceof IMetadataTable) {
    return ((IMetadataTable)inputElement).getListColumns().toArray();
  }
  return Collections.EMPTY_LIST.toArray();
}

Fixed version (ground truth):
@Override public Object[] getElements(Object inputElement){
  if (inputElement instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)inputElement).getChildren().toArray();
  }
 else   if (inputElement instanceof IMetadataTable) {
    return ((IMetadataTable)inputElement).getListColumns().toArray();
  }
  return Collections.EMPTY_LIST.toArray();
}
Program: 119799
Project: 119799
Buggy source:
public void menuAboutToShow(IMenuManager manager){
  manager.add(generateSelectAction);
}

Fixed version (ground truth):
@Override public void menuAboutToShow(IMenuManager manager){
  manager.add(generateSelectAction);
}
Program: 119800
Project: 119800
Buggy source:
@Override protected CheckboxTreeViewer doCreateTreeViewer(Composite parent,int style){
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  if (baseViewId != null) {
    provider.setViewId(baseViewId);
  }
  return (CheckboxTreeViewer)provider.createViewer(parent);
}

Fixed version (ground truth):
@Override protected CheckboxTreeViewer doCreateTreeViewer(Composite parent,int style){
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  if (baseViewId != null) {
    provider.setViewId(baseViewId);
  }
  CheckboxTreeViewer viwer=(CheckboxTreeViewer)provider.createViewer(parent);
  INavigatorContentService navigatorContentService=((INavigatorContentServiceProvider)viwer).getNavigatorContentService();
  if (navigatorContentService != null) {
    IExtensionStateModel findStateModel=navigatorContentService.findStateModel("String_Node_Str");
    if (findStateModel != null) {
      findStateModel.setBooleanProperty("String_Node_Str",true);
    }
  }
  return viwer;
}
Program: 119802
Project: 119802
Buggy source:
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData(currentSchema);
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}

Fixed version (ground truth):
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData("String_Node_Str");
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
        String[] splits=node.getColumnLabel().split("String_Node_Str");
        for (        String s : splits) {
          if (s.equals(column.getLabel())) {
            node.setDefaultValue(null);
            node.setColumn(column);
            break;
          }
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}
Program: 119805
Project: 119805
Buggy source:
@Override protected CheckboxTreeViewer doCreateTreeViewer(Composite parent,int style){
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  if (baseViewId != null) {
    provider.setViewId(baseViewId);
  }
  return (CheckboxTreeViewer)provider.createViewer(parent);
}

Fixed version (ground truth):
@Override protected CheckboxTreeViewer doCreateTreeViewer(Composite parent,int style){
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  if (baseViewId != null) {
    provider.setViewId(baseViewId);
  }
  CheckboxTreeViewer viwer=(CheckboxTreeViewer)provider.createViewer(parent);
  INavigatorContentService navigatorContentService=((INavigatorContentServiceProvider)viwer).getNavigatorContentService();
  if (navigatorContentService != null) {
    IExtensionStateModel findStateModel=navigatorContentService.findStateModel("String_Node_Str");
    if (findStateModel != null) {
      findStateModel.setBooleanProperty("String_Node_Str",true);
    }
  }
  return viwer;
}
Program: 119807
Project: 119807
Buggy source:
public boolean hasChildren(Object element){
  if (element instanceof SchemaTreeNode) {
    return true;
  }
 else   if (element instanceof IMetadataTable) {
    IMetadataTable metadataTable=(IMetadataTable)element;
    List<IMetadataColumn> columns=metadataTable.getListColumns();
    return columns != null && columns.size() > 0;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean hasChildren(Object element){
  if (element instanceof SchemaTreeNode) {
    return true;
  }
 else   if (element instanceof IMetadataTable) {
    IMetadataTable metadataTable=(IMetadataTable)element;
    List<IMetadataColumn> columns=metadataTable.getListColumns();
    return columns != null && columns.size() > 0;
  }
  return false;
}
Program: 119808
Project: 119808
Buggy source:
public String getColumnText(Object element,int columnIndex){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getName();
  }
 else   if (element instanceof IMetadataTable) {
    return ((IMetadataTable)element).getLabel();
  }
 else   if (element instanceof IMetadataColumn) {
    final IMetadataColumn metadataColumn=((IMetadataColumn)element);
    String originalDbColumnName=metadataColumn.getOriginalDbColumnName();
    return originalDbColumnName;
  }
  return null;
}

Fixed version (ground truth):
@Override public String getColumnText(Object element,int columnIndex){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getName();
  }
 else   if (element instanceof IMetadataTable) {
    return ((IMetadataTable)element).getLabel();
  }
 else   if (element instanceof IMetadataColumn) {
    final IMetadataColumn metadataColumn=((IMetadataColumn)element);
    String originalDbColumnName=metadataColumn.getOriginalDbColumnName();
    return originalDbColumnName;
  }
  return null;
}
Program: 119809
Project: 119809
Buggy source:
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
@Override public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 119810
Project: 119810
Buggy source:
@SuppressWarnings("String_Node_Str") public void init(){
  selectedNodes.clear();
  Object[] structuredSelection=((IStructuredSelection)treeViewer.getSelection()).toArray();
  for (  Object object : structuredSelection) {
    if (object instanceof MetadataTable) {
      selectedNodes.clear();
      if (((MetadataTable)object).getListColumns().isEmpty()) {
        setEnabled(false);
        return;
      }
      selectedNodes.addAll(((MetadataTable)object).getListColumns());
      break;
    }
    if (object instanceof MetadataColumn) {
      selectedNodes.add((IMetadataColumn)object);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void init(){
  selectedNodes.clear();
  Object[] structuredSelection=((IStructuredSelection)treeViewer.getSelection()).toArray();
  if (structuredSelection.length == 0) {
    setEnabled(false);
    return;
  }
  for (  Object object : structuredSelection) {
    if (object instanceof MetadataTable) {
      selectedNodes.clear();
      if (((MetadataTable)object).getListColumns().isEmpty()) {
        setEnabled(false);
        return;
      }
      selectedNodes.addAll(((MetadataTable)object).getListColumns());
      break;
    }
    if (object instanceof MetadataColumn) {
      selectedNodes.add((IMetadataColumn)object);
    }
  }
}
Program: 119811
Project: 119811
Buggy source:
public Object getParent(Object element){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getParent();
  }
 else   if (element instanceof IMetadataTable) {
    return schemaNode;
  }
  return parentMetadata;
}

Fixed version (ground truth):
@Override public Object getParent(Object element){
  if (element instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)element).getParent();
  }
 else   if (element instanceof IMetadataTable) {
    return schemaNode;
  }
  return parentMetadata;
}
Program: 119812
Project: 119812
Buggy source:
/** 
 * qzhang Comment method "addContextMenu".
 */
private void addContextMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      manager.add(generateSelectAction);
    }
  }
);
  Menu contextMenu=menuMgr.createContextMenu(treeViewer.getTree());
  treeViewer.getTree().setMenu(contextMenu);
}

Fixed version (ground truth):
/** 
 * qzhang Comment method "addContextMenu".
 */
private void addContextMenu(){
  MenuManager menuMgr=new MenuManager("String_Node_Str");
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    @Override public void menuAboutToShow(    IMenuManager manager){
      manager.add(generateSelectAction);
    }
  }
);
  Menu contextMenu=menuMgr.createContextMenu(treeViewer.getTree());
  treeViewer.getTree().setMenu(contextMenu);
}
Program: 119813
Project: 119813
Buggy source:
public Object[] getChildren(Object parentElement){
  return getElements(parentElement);
}

Fixed version (ground truth):
@Override public Object[] getChildren(Object parentElement){
  return getElements(parentElement);
}
Program: 119814
Project: 119814
Buggy source:
public Image getColumnImage(Object element,int columnIndex){
  if (element instanceof IMetadataTable) {
    return tableImage;
  }
 else {
    return columnImage;
  }
}

Fixed version (ground truth):
@Override public Image getColumnImage(Object element,int columnIndex){
  if (element instanceof IMetadataTable) {
    return tableImage;
  }
 else {
    return columnImage;
  }
}
Program: 119815
Project: 119815
Buggy source:
public Object[] getElements(Object inputElement){
  if (inputElement instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)inputElement).getChildren().toArray();
  }
 else   if (inputElement instanceof IMetadataTable) {
    return ((IMetadataTable)inputElement).getListColumns().toArray();
  }
  return Collections.EMPTY_LIST.toArray();
}

Fixed version (ground truth):
@Override public Object[] getElements(Object inputElement){
  if (inputElement instanceof SchemaTreeNode) {
    return ((SchemaTreeNode)inputElement).getChildren().toArray();
  }
 else   if (inputElement instanceof IMetadataTable) {
    return ((IMetadataTable)inputElement).getListColumns().toArray();
  }
  return Collections.EMPTY_LIST.toArray();
}
Program: 119816
Project: 119816
Buggy source:
public void menuAboutToShow(IMenuManager manager){
  manager.add(generateSelectAction);
}

Fixed version (ground truth):
@Override public void menuAboutToShow(IMenuManager manager){
  manager.add(generateSelectAction);
}
Program: 119817
Project: 119817
Buggy source:
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData(currentSchema);
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}

Fixed version (ground truth):
/** 
 * DOC xzhang Comment method "autoMap".
 */
public void autoMap(String currentSchema){
  if (this.hl7Manager instanceof HL7OutputManager) {
    List<HL7TreeNode> roots=this.hl7Manager.getTreeData("String_Node_Str");
    List<HL7TreeNode> mappableNodes=new ArrayList<HL7TreeNode>();
    for (    HL7TreeNode root : roots) {
      getMappableNode((Element)root,mappableNodes);
    }
    List<IMetadataColumn> schemaData=this.hl7Manager.getSchemaData(currentSchema);
    for (    HL7TreeNode node : mappableNodes) {
      for (      IMetadataColumn column : schemaData) {
        if (node.getLabel().equals(column.getLabel())) {
          node.setDefaultValue(null);
          node.setColumn(column);
          break;
        }
        String[] splits=node.getColumnLabel().split("String_Node_Str");
        for (        String s : splits) {
          if (s.equals(column.getLabel())) {
            node.setDefaultValue(null);
            node.setColumn(column);
            break;
          }
        }
      }
    }
    this.hl7UI.redrawLinkers();
    return;
  }
  this.hl7UI.autoMap();
}
Program: 119820
Project: 119820
Buggy source:
@SuppressWarnings("String_Node_Str") public void init(){
  selectedNodes.clear();
  Object[] structuredSelection=((IStructuredSelection)treeViewer.getSelection()).toArray();
  for (  Object object : structuredSelection) {
    if (object instanceof MetadataTable) {
      selectedNodes.clear();
      if (((MetadataTable)object).getListColumns().isEmpty()) {
        setEnabled(false);
        return;
      }
      selectedNodes.addAll(((MetadataTable)object).getListColumns());
      break;
    }
    if (object instanceof MetadataColumn) {
      selectedNodes.add((IMetadataColumn)object);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void init(){
  selectedNodes.clear();
  Object[] structuredSelection=((IStructuredSelection)treeViewer.getSelection()).toArray();
  if (structuredSelection.length == 0) {
    setEnabled(false);
    return;
  }
  for (  Object object : structuredSelection) {
    if (object instanceof MetadataTable) {
      selectedNodes.clear();
      if (((MetadataTable)object).getListColumns().isEmpty()) {
        setEnabled(false);
        return;
      }
      selectedNodes.addAll(((MetadataTable)object).getListColumns());
      break;
    }
    if (object instanceof MetadataColumn) {
      selectedNodes.add((IMetadataColumn)object);
    }
  }
}
Program: 119824
Project: 119824
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitor.beginTask("String_Node_Str",getModifiedVersionItems().size() * 100);
  Set<ERepositoryObjectType> types=new HashSet<ERepositoryObjectType>();
  for (  RepositoryObject object : getModifiedVersionItems()) {
    if (object != null && object.getProperty() != null) {
      if (object.getStatusCode().equals(object.getProperty().getStatusCode())) {
        final Item item=object.getProperty().getItem();
        item.getProperty().setOldStatusCode(object.getStatusCode());
        try {
          if (object != null) {
            FACTORY.save(project,object.getProperty());
          }
 else {
          }
        }
 catch (        PersistenceException e) {
          ExceptionHandler.process(e);
        }
      }
    }
    monitor.worked(100);
  }
  monitor.done();
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitor.beginTask("String_Node_Str",getModifiedVersionItems().size() * 100);
  Set<ERepositoryObjectType> types=new HashSet<ERepositoryObjectType>();
  for (  RepositoryObject object : getModifiedVersionItems()) {
    if (object != null && object.getProperty() != null) {
      if (object.getStatusCode().equals(object.getProperty().getStatusCode())) {
        final Item item=object.getProperty().getItem();
        item.getProperty().setOldStatusCode(object.getStatusCode());
        try {
          if (object != null) {
            FACTORY.save(project,object.getProperty());
          }
 else {
          }
        }
 catch (        PersistenceException e) {
          ExceptionHandler.process(e);
        }
      }
    }
    monitor.worked(100);
  }
  monitor.done();
}
Program: 119825
Project: 119825
Buggy source:
private void addItemTableViewer(Composite rightComposite){
  Composite composite=new Composite(rightComposite,SWT.NONE);
  composite.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().grab(true,true).applyTo(composite);
  addItemsOption(composite);
  itemTable=new Table(composite,SWT.MULTI | SWT.BORDER);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(itemTable);
  itemTable.setHeaderVisible(true);
  itemTable.setLinesVisible(true);
  TableColumn itemColumn=new TableColumn(itemTable,SWT.CENTER);
  itemColumn.setText(Messages.getString("String_Node_Str"));
  itemColumn.setWidth(110);
  TableColumn oldVersionColumn=new TableColumn(itemTable,SWT.CENTER);
  oldVersionColumn.setText(Messages.getString("String_Node_Str"));
  oldVersionColumn.setWidth(90);
  TableColumn versionColumn=new TableColumn(itemTable,SWT.CENTER);
  versionColumn.setText(Messages.getString("String_Node_Str"));
  versionColumn.setWidth(92);
  final TableColumn delColumn=new TableColumn(itemTable,SWT.CENTER);
  delColumn.setText("String_Node_Str");
  delColumn.setWidth(26);
  delColumn.setResizable(false);
  versionColumn.addControlListener(new ControlListener(){
    public void controlMoved(    ControlEvent e){
    }
    public void controlResized(    ControlEvent e){
      if (!isFixedstatus()) {
        refreshTableItems();
      }
    }
  }
);
  itemTable.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      checkButtonsState();
    }
  }
);
}

Fixed version (ground truth):
private void addItemTableViewer(Composite rightComposite){
  Composite composite=new Composite(rightComposite,SWT.NONE);
  composite.setLayout(new GridLayout());
  GridDataFactory.fillDefaults().grab(true,true).applyTo(composite);
  addItemsOption(composite);
  itemTable=new Table(composite,SWT.MULTI | SWT.BORDER);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(itemTable);
  itemTable.setHeaderVisible(true);
  itemTable.setLinesVisible(true);
  TableColumn itemColumn=new TableColumn(itemTable,SWT.CENTER);
  itemColumn.setText(Messages.getString("String_Node_Str"));
  itemColumn.setWidth(110);
  TableColumn oldVersionColumn=new TableColumn(itemTable,SWT.CENTER);
  oldVersionColumn.setText(Messages.getString("String_Node_Str"));
  oldVersionColumn.setWidth(90);
  TableColumn versionColumn=new TableColumn(itemTable,SWT.CENTER);
  versionColumn.setText(Messages.getString("String_Node_Str"));
  versionColumn.setWidth(92);
  final TableColumn delColumn=new TableColumn(itemTable,SWT.CENTER);
  delColumn.setText("String_Node_Str");
  delColumn.setWidth(26);
  delColumn.setResizable(false);
  versionColumn.addControlListener(new ControlListener(){
    @Override public void controlMoved(    ControlEvent e){
    }
    @Override public void controlResized(    ControlEvent e){
      if (!isFixedstatus()) {
        refreshTableItems();
      }
    }
  }
);
  itemTable.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      checkButtonsState();
    }
  }
);
}
Program: 119826
Project: 119826
Buggy source:
public void controlMoved(ControlEvent e){
}

Fixed version (ground truth):
@Override public void controlMoved(ControlEvent e){
}
Program: 119827
Project: 119827
Buggy source:
public void controlResized(ControlEvent e){
  if (!isFixedstatus()) {
    refreshTableItems();
  }
}

Fixed version (ground truth):
@Override public void controlResized(ControlEvent e){
  if (!isFixedstatus()) {
    refreshTableItems();
  }
}
Program: 119828
Project: 119828
Buggy source:
public void treeExpanded(TreeExpansionEvent event){
}

Fixed version (ground truth):
@Override public void treeExpanded(TreeExpansionEvent event){
}
Program: 119829
Project: 119829
Buggy source:
@SuppressWarnings("String_Node_Str") private void updateItemsVersion(){
  IRunnableWithProgress runnable=new IRunnableWithProgress(){
    public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitor.beginTask("String_Node_Str",getModifiedVersionItems().size() * 100);
      Set<ERepositoryObjectType> types=new HashSet<ERepositoryObjectType>();
      for (      RepositoryObject object : getModifiedVersionItems()) {
        if (object != null && object.getProperty() != null) {
          if (object.getStatusCode().equals(object.getProperty().getStatusCode())) {
            final Item item=object.getProperty().getItem();
            item.getProperty().setOldStatusCode(object.getStatusCode());
            try {
              if (object != null) {
                FACTORY.save(project,object.getProperty());
              }
 else {
              }
            }
 catch (            PersistenceException e) {
              ExceptionHandler.process(e);
            }
          }
        }
        monitor.worked(100);
      }
      monitor.done();
    }
  }
;
  final ProgressMonitorJobsDialog dialog=new ProgressMonitorJobsDialog(null);
  try {
    dialog.run(false,false,runnable);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void updateItemsVersion(){
  IRunnableWithProgress runnable=new IRunnableWithProgress(){
    @Override public void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      monitor.beginTask("String_Node_Str",getModifiedVersionItems().size() * 100);
      Set<ERepositoryObjectType> types=new HashSet<ERepositoryObjectType>();
      for (      RepositoryObject object : getModifiedVersionItems()) {
        if (object != null && object.getProperty() != null) {
          if (object.getStatusCode().equals(object.getProperty().getStatusCode())) {
            final Item item=object.getProperty().getItem();
            item.getProperty().setOldStatusCode(object.getStatusCode());
            try {
              if (object != null) {
                FACTORY.save(project,object.getProperty());
              }
 else {
              }
            }
 catch (            PersistenceException e) {
              ExceptionHandler.process(e);
            }
          }
        }
        monitor.worked(100);
      }
      monitor.done();
    }
  }
;
  final ProgressMonitorJobsDialog dialog=new ProgressMonitorJobsDialog(null);
  try {
    dialog.run(false,false,runnable);
  }
 catch (  InvocationTargetException e) {
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.process(e);
  }
}
Program: 119830
Project: 119830
Buggy source:
/** 
 * repository tree viewer.
 */
private void addRepositoryTreeViewer(Composite leftComposite){
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.widthHint=210;
  gridData.heightHint=400;
  leftComposite.setLayoutData(gridData);
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  treeViewer=(CheckboxRepositoryTreeViewer)provider.createViewer(leftComposite);
  treeViewer.addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      RepositoryNode node=(RepositoryNode)element;
      return filterRepositoryNode(node);
    }
  }
);
  treeViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      RepositoryNode node=(RepositoryNode)event.getElement();
      List<RepositoryObject> objects=new ArrayList<RepositoryObject>();
      processItems(objects,node);
      if (!objects.isEmpty()) {
        if (event.getChecked()) {
          checkedObjects.addAll(objects);
        }
 else {
          checkedObjects.removeAll(objects);
          removeItemElements(objects);
        }
        refreshTableItems();
      }
    }
  }
);
  treeViewer.addTreeListener(new ITreeViewerListener(){
    public void treeCollapsed(    TreeExpansionEvent event){
    }
    public void treeExpanded(    TreeExpansionEvent event){
    }
  }
);
  expandSomeNodes(provider.getProjectRepositoryNode());
}

Fixed version (ground truth):
/** 
 * repository tree viewer.
 */
private void addRepositoryTreeViewer(Composite leftComposite){
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.widthHint=210;
  gridData.heightHint=400;
  leftComposite.setLayoutData(gridData);
  RepoCommonViewerProvider provider=RepoCommonViewerProvider.CHECKBOX;
  treeViewer=(CheckboxRepositoryTreeViewer)provider.createViewer(leftComposite);
  treeViewer.addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      RepositoryNode node=(RepositoryNode)element;
      return filterRepositoryNode(node);
    }
  }
);
  treeViewer.addCheckStateListener(new ICheckStateListener(){
    @Override public void checkStateChanged(    CheckStateChangedEvent event){
      RepositoryNode node=(RepositoryNode)event.getElement();
      List<RepositoryObject> objects=new ArrayList<RepositoryObject>();
      processItems(objects,node);
      if (!objects.isEmpty()) {
        if (event.getChecked()) {
          checkedObjects.addAll(objects);
        }
 else {
          checkedObjects.removeAll(objects);
          removeItemElements(objects);
        }
        refreshTableItems();
      }
    }
  }
);
  treeViewer.addTreeListener(new ITreeViewerListener(){
    @Override public void treeCollapsed(    TreeExpansionEvent event){
    }
    @Override public void treeExpanded(    TreeExpansionEvent event){
    }
  }
);
  expandSomeNodes(provider.getProjectRepositoryNode());
}
Program: 119831
Project: 119831
Buggy source:
public void treeCollapsed(TreeExpansionEvent event){
}

Fixed version (ground truth):
@Override public void treeCollapsed(TreeExpansionEvent event){
}
Program: 119832
Project: 119832
Buggy source:
public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<RepositoryObject> objects=new ArrayList<RepositoryObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    refreshTableItems();
  }
}

Fixed version (ground truth):
@Override public void checkStateChanged(CheckStateChangedEvent event){
  RepositoryNode node=(RepositoryNode)event.getElement();
  List<RepositoryObject> objects=new ArrayList<RepositoryObject>();
  processItems(objects,node);
  if (!objects.isEmpty()) {
    if (event.getChecked()) {
      checkedObjects.addAll(objects);
    }
 else {
      checkedObjects.removeAll(objects);
      removeItemElements(objects);
    }
    refreshTableItems();
  }
}
Program: 119835
Project: 119835
Buggy source:
@Override public Object getOriginalTypedValue(CellEditor cellEditor,Object cellEditorTypedValue){
  Object returnedValue=null;
  if (cellEditorTypedValue != null && cellEditorTypedValue instanceof Integer) {
    int index=(Integer)cellEditorTypedValue;
    String[] namesSet=((CCombo)cellEditor.getControl()).getItems();
    if (namesSet.length > 0 && index > -1 && index < namesSet.length) {
      returnedValue=namesSet[index];
    }
 else {
      returnedValue=null;
    }
  }
 else {
    returnedValue=null;
  }
  if (element instanceof INode) {
    INode node=(INode)element;
    if (node.getComponent().getName() != null && node.getComponent().getName().equals("String_Node_Str")) {
      if (!EmfComponent.REPOSITORY.equals(node.getPropertyValue(EParameterName.PROPERTY_TYPE.getName()))) {
        IElementParameter rootParameter=element.getElementParameter("String_Node_Str");
        if (rootParameter != null) {
          List<Map<String,String>> rootValue=(List<Map<String,String>>)rootParameter.getValue();
          if (rootValue != null) {
            for (int i=0; i < rootValue.size(); i++) {
              Map<String,String> map=rootValue.get(i);
              String columnName=map.get("String_Node_Str");
              String split[]=columnName.split("String_Node_Str");
              if (split.length == 2 && !returnedValue.equals("String_Node_Str")) {
                String newName=returnedValue + "String_Node_Str" + split[1];
                map.put("String_Node_Str",newName);
              }
 else               if (split.length == 1 && !returnedValue.equals("String_Node_Str")) {
                String newName=(String)returnedValue;
                map.put("String_Node_Str",newName);
              }
            }
          }
        }
      }
    }
  }
  return returnedValue;
}

Fixed version (ground truth):
@Override public Object getOriginalTypedValue(CellEditor cellEditor,Object cellEditorTypedValue){
  Object returnedValue=null;
  if (cellEditorTypedValue != null && cellEditorTypedValue instanceof Integer) {
    int index=(Integer)cellEditorTypedValue;
    String[] namesSet=((CCombo)cellEditor.getControl()).getItems();
    if (namesSet.length > 0 && index > -1 && index < namesSet.length) {
      returnedValue=namesSet[index];
    }
 else {
      returnedValue=null;
    }
  }
 else {
    returnedValue=null;
  }
  return returnedValue;
}
Program: 119836
Project: 119836
Buggy source:
public void renameInputConnection(String oldName,String newName){
  INode node=getOriginalNode();
  if (oldName != null) {
    IElementParameter elementParameter=this.getElementParameter("String_Node_Str");
    if (elementParameter != null) {
      Object listItemsValue=elementParameter.getValue();
      if (listItemsValue instanceof List) {
        for (        Object obj : (List)listItemsValue) {
          if (obj instanceof Map) {
            Object row=((Map)obj).get("String_Node_Str");
            if (oldName.equals(row)) {
              ((Map)obj).put("String_Node_Str",newName);
            }
          }
        }
      }
    }
  }
  if (node != null && !EmfComponent.REPOSITORY.equals(node.getPropertyValue(EParameterName.PROPERTY_TYPE.getName()))) {
    List<Map<String,String>> listRoot=(List<Map<String,String>>)this.getElementParameter(ROOT).getValue();
    boolean flagRoot=false;
    String schemaId=oldName + "String_Node_Str";
    for (    Map<String,String> map : listRoot) {
      String rowName=map.get(COLUMN);
      if (rowName == null) {
        continue;
      }
      if (rowName.equals(oldName)) {
        map.put(COLUMN,newName);
        flagRoot=true;
      }
 else       if (rowName.startsWith(schemaId)) {
        rowName=newName + rowName.substring(rowName.indexOf("String_Node_Str"));
        map.put(COLUMN,rowName);
        flagRoot=true;
      }
    }
    if (flagRoot) {
      this.getElementParameter(ROOT).setValue(listRoot);
    }
  }
}

Fixed version (ground truth):
public void renameInputConnection(String oldName,String newName){
  INode node=getOriginalNode();
  if (oldName != null) {
    IElementParameter elementParameter=this.getElementParameter("String_Node_Str");
    if (elementParameter != null) {
      Object listItemsValue=elementParameter.getValue();
      if (listItemsValue instanceof List) {
        for (        Object obj : (List)listItemsValue) {
          if (obj instanceof Map) {
            Object row=((Map)obj).get("String_Node_Str");
            if (oldName.equals(row)) {
              ((Map)obj).put("String_Node_Str",newName);
            }
          }
        }
      }
    }
  }
}