nus-yam/ex-repair huggingface dataset:
Program: 119490
Project: 119490
Buggy source:
public void handleListenableListAfterTableViewerRefreshedEvent(final ListenableListEvent<SchemaTarget> event){
  if (event.type == ListenableListEvent.TYPE.ADDED) {
    ProgressDialog progressDialog=new ProgressDialog(getTree().getShell(),1000){
      private IProgressMonitor monitorWrap;
      @Override public void run(      IProgressMonitor monitor){
        monitorWrap=SubMonitor.convert(monitor);
        List<SchemaTarget> addedObjects=new ArrayList<SchemaTarget>(event.addedObjects);
        JSONToXPathLinker.this.createFieldsLinkWithProgressMonitor(monitorWrap,addedObjects.size(),addedObjects,event.index,addedObjects.size());
        monitorWrap.done();
      }
    }
;
    try {
      progressDialog.executeProcess();
    }
 catch (    InvocationTargetException e) {
      ExceptionHandler.process(e);
    }
catch (    InterruptedException e) {
    }
    getBackgroundRefresher().refreshBackground();
  }
 else   if (event.type == ListenableListEvent.TYPE.SWAPED) {
    getBackgroundRefresher().refreshBackground();
  }
 else   if (event.type == TYPE.REMOVED) {
    getBackgroundRefresher().refreshBackground();
  }
}

Fixed version (ground truth):
public void handleListenableListAfterTableViewerRefreshedEvent(final ListenableListEvent<SchemaTarget> event){
  if (event.type == ListenableListEvent.TYPE.ADDED) {
    ProgressDialog progressDialog=new ProgressDialog(getTree().getShell(),1000){
      private IProgressMonitor monitorWrap;
      @Override public void run(      IProgressMonitor monitor){
        monitorWrap=new EventLoopProgressMonitor(monitor);
        List<SchemaTarget> addedObjects=new ArrayList<SchemaTarget>(event.addedObjects);
        JSONToXPathLinker.this.createFieldsLinkWithProgressMonitor(monitorWrap,addedObjects.size(),addedObjects,event.index,addedObjects.size());
        monitorWrap.done();
      }
    }
;
    try {
      progressDialog.executeProcess();
    }
 catch (    InvocationTargetException e) {
      ExceptionHandler.process(e);
    }
catch (    InterruptedException e) {
    }
    getBackgroundRefresher().refreshBackground();
  }
 else   if (event.type == ListenableListEvent.TYPE.SWAPED) {
    getBackgroundRefresher().refreshBackground();
  }
 else   if (event.type == TYPE.REMOVED) {
    getBackgroundRefresher().refreshBackground();
  }
}
Program: 119491
Project: 119491
Buggy source:
@Override public void run(IProgressMonitor monitor){
  TreeItem root=jsonViewer.getTree().getItem(0);
  List<TreeItem> allItems=TreeUtils.collectAllItems(root);
  monitorWrap=SubMonitor.convert(monitor);
  String taskName="String_Node_Str";
  int totalWork=allItems.size();
  monitorWrap.beginTask(taskName,totalWork);
  for (int i=0; i < totalWork; i++) {
    if (monitorWrap.isCanceled()) {
      return;
    }
    TreeItem treeItem=allItems.get(i);
    FOXTreeNode node=(FOXTreeNode)treeItem.getData();
    if (node.getColumn() == null) {
      continue;
    }
    createLoopLinks(node.getColumn().getLabel(),treeItem,monitorWrap,i == totalWork - 1);
    monitorWrap.worked(1);
  }
  monitorWrap.done();
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor){
  TreeItem root=jsonViewer.getTree().getItem(0);
  List<TreeItem> allItems=TreeUtils.collectAllItems(root);
  monitorWrap=new EventLoopProgressMonitor(monitor);
  String taskName="String_Node_Str";
  int totalWork=allItems.size();
  monitorWrap.beginTask(taskName,totalWork);
  for (int i=0; i < totalWork; i++) {
    if (monitorWrap.isCanceled()) {
      return;
    }
    TreeItem treeItem=allItems.get(i);
    FOXTreeNode node=(FOXTreeNode)treeItem.getData();
    if (node.getColumn() == null) {
      continue;
    }
    createLoopLinks(node.getColumn().getLabel(),treeItem,monitorWrap,i == totalWork - 1);
    monitorWrap.worked(1);
  }
  monitorWrap.done();
}
Program: 119492
Project: 119492
Buggy source:
public void createLinks(){
  removeAllLinks();
  getBackgroundRefresher().refreshBackground();
  ProgressDialog progressDialog=new ProgressDialog(getSource().getShell(),1000){
    private IProgressMonitor monitorWrap;
    @Override public void run(    IProgressMonitor monitor){
      TreeItem root=jsonViewer.getTree().getItem(0);
      List<TreeItem> allItems=TreeUtils.collectAllItems(root);
      monitorWrap=SubMonitor.convert(monitor);
      String taskName="String_Node_Str";
      int totalWork=allItems.size();
      monitorWrap.beginTask(taskName,totalWork);
      for (int i=0; i < totalWork; i++) {
        if (monitorWrap.isCanceled()) {
          return;
        }
        TreeItem treeItem=allItems.get(i);
        FOXTreeNode node=(FOXTreeNode)treeItem.getData();
        if (node.getColumn() == null) {
          continue;
        }
        createLoopLinks(node.getColumn().getLabel(),treeItem,monitorWrap,i == totalWork - 1);
        monitorWrap.worked(1);
      }
      monitorWrap.done();
    }
  }
;
  try {
    progressDialog.executeProcess();
  }
 catch (  InvocationTargetException e) {
    e.printStackTrace();
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
public void createLinks(){
  removeAllLinks();
  getBackgroundRefresher().refreshBackground();
  ProgressDialog progressDialog=new ProgressDialog(getSource().getShell(),1000){
    private IProgressMonitor monitorWrap;
    @Override public void run(    IProgressMonitor monitor){
      TreeItem root=jsonViewer.getTree().getItem(0);
      List<TreeItem> allItems=TreeUtils.collectAllItems(root);
      monitorWrap=new EventLoopProgressMonitor(monitor);
      String taskName="String_Node_Str";
      int totalWork=allItems.size();
      monitorWrap.beginTask(taskName,totalWork);
      for (int i=0; i < totalWork; i++) {
        if (monitorWrap.isCanceled()) {
          return;
        }
        TreeItem treeItem=allItems.get(i);
        FOXTreeNode node=(FOXTreeNode)treeItem.getData();
        if (node.getColumn() == null) {
          continue;
        }
        createLoopLinks(node.getColumn().getLabel(),treeItem,monitorWrap,i == totalWork - 1);
        monitorWrap.worked(1);
      }
      monitorWrap.done();
    }
  }
;
  try {
    progressDialog.executeProcess();
  }
 catch (  InvocationTargetException e) {
    e.printStackTrace();
    ExceptionHandler.process(e);
  }
catch (  InterruptedException e) {
    ExceptionHandler.process(e);
  }
}
Program: 119495
Project: 119495
Buggy source:
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitorWrap=SubMonitor.convert(monitor);
  try {
    if (null == selectPro) {
      throw new IOException("String_Node_Str");
    }
    ImportProjectsUtilities.importDemoProject(getShell(),projectName,selectPro,monitor);
  }
 catch (  Exception e1) {
    throw new InvocationTargetException(e1);
  }
  monitorWrap.done();
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitorWrap=new EventLoopProgressMonitor(monitor);
  try {
    if (null == selectPro) {
      throw new IOException("String_Node_Str");
    }
    ImportProjectsUtilities.importDemoProject(getShell(),projectName,selectPro,monitor);
  }
 catch (  Exception e1) {
    throw new InvocationTargetException(e1);
  }
  monitorWrap.done();
}
Program: 119496
Project: 119496
Buggy source:
public boolean prefromFinish(){
  final DemoProjectBean selectPro=this.demoProjectList.get(selectedDemoProjectIndex);
  NewImportProjectWizard newPrjWiz=new NewImportProjectWizard();
  WizardDialog newProjectDialog=new WizardDialog(getShell(),newPrjWiz);
  newProjectDialog.setTitle(Messages.getString("String_Node_Str"));
  if (newProjectDialog.open() == Window.OK) {
    final String projectName=newPrjWiz.getName().trim().replace(' ','_');
    ProgressDialog progressDialog=new ProgressDialog(getShell()){
      private IProgressMonitor monitorWrap;
      @Override public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        monitorWrap=SubMonitor.convert(monitor);
        try {
          if (null == selectPro) {
            throw new IOException("String_Node_Str");
          }
          ImportProjectsUtilities.importDemoProject(getShell(),projectName,selectPro,monitor);
        }
 catch (        Exception e1) {
          throw new InvocationTargetException(e1);
        }
        monitorWrap.done();
      }
    }
;
    try {
      progressDialog.executeProcess();
    }
 catch (    InvocationTargetException e1) {
      MessageBoxExceptionHandler.process(e1.getTargetException(),getShell());
    }
catch (    InterruptedException e1) {
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean prefromFinish(){
  final DemoProjectBean selectPro=this.demoProjectList.get(selectedDemoProjectIndex);
  NewImportProjectWizard newPrjWiz=new NewImportProjectWizard();
  WizardDialog newProjectDialog=new WizardDialog(getShell(),newPrjWiz);
  newProjectDialog.setTitle(Messages.getString("String_Node_Str"));
  if (newProjectDialog.open() == Window.OK) {
    final String projectName=newPrjWiz.getName().trim().replace(' ','_');
    ProgressDialog progressDialog=new ProgressDialog(getShell()){
      private IProgressMonitor monitorWrap;
      @Override public void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        monitorWrap=new EventLoopProgressMonitor(monitor);
        try {
          if (null == selectPro) {
            throw new IOException("String_Node_Str");
          }
          ImportProjectsUtilities.importDemoProject(getShell(),projectName,selectPro,monitor);
        }
 catch (        Exception e1) {
          throw new InvocationTargetException(e1);
        }
        monitorWrap.done();
      }
    }
;
    try {
      progressDialog.executeProcess();
    }
 catch (    InvocationTargetException e1) {
      MessageBoxExceptionHandler.process(e1.getTargetException(),getShell());
    }
catch (    InterruptedException e1) {
    }
  }
  return true;
}
Program: 119498
Project: 119498
Buggy source:
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitorWrap=SubMonitor.convert(monitor);
  try {
    if (!isArchive) {
      ImportProjectsUtilities.importProjectAs(shell,name,technicalName,sourcePath,monitorWrap);
    }
 else {
      ImportProjectsUtilities.importArchiveProjectAs(shell,name,technicalName,sourcePath,monitorWrap);
    }
  }
 catch (  IOException e) {
    throw new InvocationTargetException(e);
  }
catch (  TarException e) {
    throw new InvocationTargetException(e);
  }
  monitorWrap.done();
  MessageDialog.openInformation(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  monitorWrap=new EventLoopProgressMonitor(monitor);
  try {
    if (!isArchive) {
      ImportProjectsUtilities.importProjectAs(shell,name,technicalName,sourcePath,monitorWrap);
    }
 else {
      ImportProjectsUtilities.importArchiveProjectAs(shell,name,technicalName,sourcePath,monitorWrap);
    }
  }
 catch (  IOException e) {
    throw new InvocationTargetException(e);
  }
catch (  TarException e) {
    throw new InvocationTargetException(e);
  }
  monitorWrap.done();
  MessageDialog.openInformation(shell,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
}
Program: 119502
Project: 119502
Buggy source:
@Override public boolean getEnabledState(){
  if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
    if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
      TableItem item=extendedTableViewer.getTable().getSelection()[0];
      HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
      List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
      for (      HashMap<String,String> parameterValueMap : parameterValue) {
        if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
          if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
            return true;
          }
        }
      }
    }
  }
  return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
}

Fixed version (ground truth):
@Override public boolean getEnabledState(){
  if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
    if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
      TableItem item=extendedTableViewer.getTable().getSelection()[0];
      HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
      List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
      for (      HashMap<String,String> parameterValueMap : parameterValue) {
        if (parameterValueMap != null && itemMap != null && parameterValueMap.get("String_Node_Str") != null && itemMap.get("String_Node_Str") != null) {
          if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
            if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
              return true;
            }
          }
        }
      }
    }
  }
  return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
}
Program: 119503
Project: 119503
Buggy source:
@Override protected RemovePushButton createRemovePushButton(){
  RemovePushButtonForExtendedTable removePushButton=new RemovePushButtonForExtendedTable(this.toolbar,getExtendedTableViewer()){
    @Override public boolean getEnabledState(){
      if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
        if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
          TableItem item=extendedTableViewer.getTable().getSelection()[0];
          HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
          List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
          for (          HashMap<String,String> parameterValueMap : parameterValue) {
            if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
              if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
                return true;
              }
            }
          }
        }
      }
      return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
    }
  }
;
  removePushButton.addListener(getPropertyChangeListener(),false);
  return removePushButton;
}

Fixed version (ground truth):
@Override protected RemovePushButton createRemovePushButton(){
  RemovePushButtonForExtendedTable removePushButton=new RemovePushButtonForExtendedTable(this.toolbar,getExtendedTableViewer()){
    @Override public boolean getEnabledState(){
      if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
        if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
          TableItem item=extendedTableViewer.getTable().getSelection()[0];
          HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
          List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
          for (          HashMap<String,String> parameterValueMap : parameterValue) {
            if (parameterValueMap != null && itemMap != null && parameterValueMap.get("String_Node_Str") != null && itemMap.get("String_Node_Str") != null) {
              if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
                if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
                  return true;
                }
              }
            }
          }
        }
      }
      return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
    }
  }
;
  removePushButton.addListener(getPropertyChangeListener(),false);
  return removePushButton;
}
Program: 119504
Project: 119504
Buggy source:
@Override public INode getRefrenceNode(String componentName){
  if (componentName == null) {
    return null;
  }
  IComponentsFactory compFac=CorePlugin.getDefault().getRepositoryService().getComponentsFactory();
  IComponent salesforceComponent=compFac.get(componentName);
  return new DataNode(salesforceComponent,componentName);
}

Fixed version (ground truth):
@Override public INode getRefrenceNode(String componentName,String paletteType){
  if (componentName == null) {
    return null;
  }
  IComponentsFactory compFac=CorePlugin.getDefault().getRepositoryService().getComponentsFactory();
  IComponent salesforceComponent=compFac.get(componentName,paletteType);
  return new DataNode(salesforceComponent,componentName);
}
Program: 119505
Project: 119505
Buggy source:
private void initHadoopVersionType(){
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.PIG;
      IElementParameter elementParameter=node.getElementParameter("String_Node_Str");
      if (elementParameter != null) {
        String value=elementParameter.getListItemsDisplayCodeName()[elementParameter.getIndexOfItemFromList(String.valueOf(elementParameter.getValue()))];
        if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HCATALOG;
        }
 else         if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HBASE;
        }
      }
    }
 else {
      compName=compName.substring(1).toUpperCase();
      ECustomVersionType[] versions=ECustomVersionType.values();
      for (      ECustomVersionType version : versions) {
        if (compName.startsWith(version.getName())) {
          versionType=version;
          break;
        }
      }
    }
  }
  if (versionType == null) {
    versionType=ECustomVersionType.HDFS;
  }
}

Fixed version (ground truth):
private void initHadoopVersionType(){
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.PIG;
      IElementParameter elementParameter=node.getElementParameter("String_Node_Str");
      if (elementParameter != null) {
        String value=elementParameter.getListItemsDisplayCodeName()[elementParameter.getIndexOfItemFromList(String.valueOf(elementParameter.getValue()))];
        if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HCATALOG;
        }
 else         if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HBASE;
        }
      }
    }
 else {
      compName=compName.substring(1).toUpperCase();
      ECustomVersionType[] versions=ECustomVersionType.values();
      for (      ECustomVersionType version : versions) {
        if (compName.startsWith(version.getName())) {
          versionType=version;
          break;
        }
      }
    }
  }
  if (versionType == null) {
    versionType=ECustomVersionType.MAP_REDUCE;
  }
}
Program: 119506
Project: 119506
Buggy source:
@Override public boolean getEnabledState(){
  if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
    if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
      TableItem item=extendedTableViewer.getTable().getSelection()[0];
      HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
      List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
      for (      HashMap<String,String> parameterValueMap : parameterValue) {
        if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
          if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
            return true;
          }
        }
      }
    }
  }
  return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
}

Fixed version (ground truth):
@Override public boolean getEnabledState(){
  if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
    if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
      TableItem item=extendedTableViewer.getTable().getSelection()[0];
      HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
      List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
      for (      HashMap<String,String> parameterValueMap : parameterValue) {
        if (parameterValueMap != null && itemMap != null && parameterValueMap.get("String_Node_Str") != null && itemMap.get("String_Node_Str") != null) {
          if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
            if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
              return true;
            }
          }
        }
      }
    }
  }
  return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
}
Program: 119507
Project: 119507
Buggy source:
@Override protected RemovePushButton createRemovePushButton(){
  RemovePushButtonForExtendedTable removePushButton=new RemovePushButtonForExtendedTable(this.toolbar,getExtendedTableViewer()){
    @Override public boolean getEnabledState(){
      if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
        if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
          TableItem item=extendedTableViewer.getTable().getSelection()[0];
          HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
          List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
          for (          HashMap<String,String> parameterValueMap : parameterValue) {
            if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
              if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
                return true;
              }
            }
          }
        }
      }
      return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
    }
  }
;
  removePushButton.addListener(getPropertyChangeListener(),false);
  return removePushButton;
}

Fixed version (ground truth):
@Override protected RemovePushButton createRemovePushButton(){
  RemovePushButtonForExtendedTable removePushButton=new RemovePushButtonForExtendedTable(this.toolbar,getExtendedTableViewer()){
    @Override public boolean getEnabledState(){
      if (model != null && (model.getElemParameter().getName().equals("String_Node_Str") || model.getElemParameter().getName().equals("String_Node_Str"))) {
        if (getExtendedTableViewer().getTable().getSelectionIndex() > -1) {
          TableItem item=extendedTableViewer.getTable().getSelection()[0];
          HashMap<String,String> itemMap=(HashMap<String,String>)item.getData();
          List<HashMap<String,String>> parameterValue=(List<HashMap<String,String>>)model.getElemParameter().getValue();
          for (          HashMap<String,String> parameterValueMap : parameterValue) {
            if (parameterValueMap != null && itemMap != null && parameterValueMap.get("String_Node_Str") != null && itemMap.get("String_Node_Str") != null) {
              if (parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str")) && parameterValueMap.get("String_Node_Str").equals(itemMap.get("String_Node_Str"))) {
                if (parameterValueMap.get("String_Node_Str") != null && parameterValueMap.get("String_Node_Str").equals("String_Node_Str")) {
                  return true;
                }
              }
            }
          }
        }
      }
      return super.getEnabledState() && (model == null || !model.getElemParameter().isBasedOnSubjobStarts());
    }
  }
;
  removePushButton.addListener(getPropertyChangeListener(),false);
  return removePushButton;
}
Program: 119512
Project: 119512
Buggy source:
@Override public INode getRefrenceNode(String componentName){
  if (componentName == null) {
    return null;
  }
  IComponentsFactory compFac=CorePlugin.getDefault().getRepositoryService().getComponentsFactory();
  IComponent salesforceComponent=compFac.get(componentName);
  return new DataNode(salesforceComponent,componentName);
}

Fixed version (ground truth):
@Override public INode getRefrenceNode(String componentName,String paletteType){
  if (componentName == null) {
    return null;
  }
  IComponentsFactory compFac=CorePlugin.getDefault().getRepositoryService().getComponentsFactory();
  IComponent salesforceComponent=compFac.get(componentName,paletteType);
  return new DataNode(salesforceComponent,componentName);
}
Program: 119513
Project: 119513
Buggy source:
private void initHadoopVersionType(){
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.PIG;
      IElementParameter elementParameter=node.getElementParameter("String_Node_Str");
      if (elementParameter != null) {
        String value=elementParameter.getListItemsDisplayCodeName()[elementParameter.getIndexOfItemFromList(String.valueOf(elementParameter.getValue()))];
        if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HCATALOG;
        }
 else         if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HBASE;
        }
      }
    }
 else {
      compName=compName.substring(1).toUpperCase();
      ECustomVersionType[] versions=ECustomVersionType.values();
      for (      ECustomVersionType version : versions) {
        if (compName.startsWith(version.getName())) {
          versionType=version;
          break;
        }
      }
    }
  }
  if (versionType == null) {
    versionType=ECustomVersionType.HDFS;
  }
}

Fixed version (ground truth):
private void initHadoopVersionType(){
  if (elem instanceof Node) {
    Node node=(Node)elem;
    String compName=node.getComponent().getName();
    if (compName.startsWith("String_Node_Str")) {
      versionType=ECustomVersionType.PIG;
      IElementParameter elementParameter=node.getElementParameter("String_Node_Str");
      if (elementParameter != null) {
        String value=elementParameter.getListItemsDisplayCodeName()[elementParameter.getIndexOfItemFromList(String.valueOf(elementParameter.getValue()))];
        if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HCATALOG;
        }
 else         if ("String_Node_Str".equals(value)) {
          versionType=ECustomVersionType.PIG_HBASE;
        }
      }
    }
 else {
      compName=compName.substring(1).toUpperCase();
      ECustomVersionType[] versions=ECustomVersionType.values();
      for (      ECustomVersionType version : versions) {
        if (compName.startsWith(version.getName())) {
          versionType=version;
          break;
        }
      }
    }
  }
  if (versionType == null) {
    versionType=ECustomVersionType.MAP_REDUCE;
  }
}
Program: 119523
Project: 119523
Buggy source:
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
}

Fixed version (ground truth):
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(processItem);
  for (  JobInfo subjobInfo : subjobInfos) {
    addContextScripts(subjobInfo.getProcessItem(),subjobInfo.getJobName(),subjobInfo.getJobVersion(),contextResource,needContext);
  }
}
Program: 119524
Project: 119524
Buggy source:
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
}

Fixed version (ground truth):
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(processItem);
  for (  JobInfo subjobInfo : subjobInfos) {
    addContextScripts(subjobInfo.getProcessItem(),subjobInfo.getJobName(),subjobInfo.getJobVersion(),contextResource,needContext);
  }
}
Program: 119531
Project: 119531
Buggy source:
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
}

Fixed version (ground truth):
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(processItem);
  for (  JobInfo subjobInfo : subjobInfos) {
    addContextScripts(subjobInfo.getProcessItem(),subjobInfo.getJobName(),subjobInfo.getJobVersion(),contextResource,needContext);
  }
}
Program: 119532
Project: 119532
Buggy source:
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
}

Fixed version (ground truth):
protected void getContextScripts(ProcessItem processItem,Boolean needContext,ExportFileResource contextResource,String version){
  String jobName=processItem.getProperty().getLabel();
  addContextScripts(processItem,jobName,version,contextResource,needContext);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(processItem);
  for (  JobInfo subjobInfo : subjobInfos) {
    addContextScripts(subjobInfo.getProcessItem(),subjobInfo.getJobName(),subjobInfo.getJobVersion(),contextResource,needContext);
  }
}
Program: 119541
Project: 119541
Buggy source:
private void createLoopLinks(List<FOXTreeNode> treeData){
  for (  FOXTreeNode treeNode : treeData) {
    if (treeNode.getColumn() != null) {
      TableItem tableItem=null;
      for (      TableItem curTableItem : getSource().getItems()) {
        if (curTableItem.getText().equals(treeNode.getColumnLabel())) {
          tableItem=curTableItem;
          break;
        }
      }
      if (tableItem == null) {
        continue;
      }
      String path=tableItem.getText();
      if (path != null) {
        TreeItem treeItem=getTreeItem(treeNode);
        if (treeItem != null) {
          addLoopLink(tableItem,tableItem.getData(),xmlViewer.getTree(),(FOXTreeNode)treeItem.getData());
        }
      }
    }
    createLoopLinks(treeNode.getChildren());
  }
}

Fixed version (ground truth):
private void createLoopLinks(List<FOXTreeNode> treeData){
  for (  FOXTreeNode treeNode : treeData) {
    if (treeNode.getColumn() != null) {
      TableItem tableItem=null;
      for (      TableItem curTableItem : getSource().getItems()) {
        String columnLabel=treeNode.getColumn().getLabel();
        if (curTableItem.getText().equals(columnLabel)) {
          tableItem=curTableItem;
          break;
        }
      }
      if (tableItem == null) {
        continue;
      }
      String path=tableItem.getText();
      if (path != null) {
        TreeItem treeItem=getTreeItem(treeNode);
        if (treeItem != null) {
          addLoopLink(tableItem,tableItem.getData(),xmlViewer.getTree(),(FOXTreeNode)treeItem.getData());
        }
      }
    }
    createLoopLinks(treeNode.getChildren());
  }
}
Program: 119542
Project: 119542
Buggy source:
protected void setConnectionProperty(IConnectionProperty connectionProperty){
  this.connectionProperty=connectionProperty;
  setLineStyle(connectionProperty.getLineStyle());
  Color color=ColorUtils.getCacheColor(connectionProperty.getRGB());
  ResourceDisposeUtil.setAndCheckColor(this,color,true);
}

Fixed version (ground truth):
protected void setConnectionProperty(IConnectionProperty connectionProperty){
  if (connectionProperty == null) {
    return;
  }
  this.connectionProperty=connectionProperty;
  setLineStyle(connectionProperty.getLineStyle());
  Color color=ColorUtils.getCacheColor(connectionProperty.getRGB());
  ResourceDisposeUtil.setAndCheckColor(this,color,true);
}
Program: 119544
Project: 119544
Buggy source:
@Override public void undo(){
  Process process;
  if (nodeList.size() > 0) {
    process=(Process)nodeList.get(0).getProcess();
  }
 else {
    process=(Process)connectionList.get(0).getSource().getProcess();
  }
  process.setActivate(false);
  if (!componentListChanged.isEmpty()) {
    List<? extends INode> graphicalNodes=process.getGraphicalNodes();
    for (    INode node : graphicalNodes) {
      List<? extends IElementParameter> elementParameters=node.getElementParameters();
      for (      IElementParameter param : elementParameters) {
        EParameterFieldType fieldType=param.getFieldType();
        if (EParameterFieldType.COMPONENT_LIST == fieldType) {
          String key=node.getUniqueName() + "String_Node_Str" + param.getName();
          Object object=componentListChanged.get(key);
          if (object != null) {
            param.setValue(object);
            node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
          }
        }
      }
    }
  }
  dummyMiddleElement(true);
  for (  Node node : nodeList) {
    if (isSameSchemaInputOutput(node)) {
      node.setPropertyValue(EParameterName.DUMMY.getName(),value);
    }
    node.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  for (  Connection connection : connectionList) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  if (connectionList != null && connectionList.size() != 0) {
    if (connIndex < outputs.size()) {
      outputs.remove(this.curConn);
      outputs.add(outputs.size() - deactiveNum,(Connection)object);
    }
    if (connIndex >= outputs.size()) {
      outputs.add(curConn);
    }
    curConn.updateAllId();
  }
  process.setActivate(true);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}

Fixed version (ground truth):
@Override public void undo(){
  Process process;
  if (nodeList.size() > 0) {
    process=(Process)nodeList.get(0).getProcess();
  }
 else {
    process=(Process)connectionList.get(0).getSource().getProcess();
  }
  process.setActivate(false);
  dummyMiddleElement(true);
  for (  Node node : nodeList) {
    if (isSameSchemaInputOutput(node)) {
      node.setPropertyValue(EParameterName.DUMMY.getName(),value);
    }
    node.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  for (  Connection connection : connectionList) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  if (connectionList != null && connectionList.size() != 0) {
    if (connIndex < outputs.size()) {
      outputs.remove(this.curConn);
      outputs.add(outputs.size() - deactiveNum,(Connection)object);
    }
    if (connIndex >= outputs.size()) {
      outputs.add(curConn);
    }
    curConn.updateAllId();
  }
  process.setActivate(true);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}
Program: 119545
Project: 119545
Buggy source:
@Override public void redo(){
  componentListChanged.clear();
  this.execute();
}

Fixed version (ground truth):
@Override public void redo(){
  this.execute();
}
Program: 119547
Project: 119547
Buggy source:
public void undo(){
  Process process=(Process)node.getProcess();
  process.setActivateSubjob(node,!value,oneComponent);
  if (!componentListChanged.isEmpty()) {
    List<? extends INode> graphicalNodes=process.getGraphicalNodes();
    for (    INode gNode : graphicalNodes) {
      if (gNode == this.node) {
        continue;
      }
      List<? extends IElementParameter> elementParameters=gNode.getElementParameters();
      for (      IElementParameter param : elementParameters) {
        EParameterFieldType fieldType=param.getFieldType();
        if (EParameterFieldType.COMPONENT_LIST == fieldType) {
          String key=gNode.getUniqueName() + "String_Node_Str" + param.getName();
          Object object=componentListChanged.get(key);
          if (object != null) {
            param.setValue(object);
            gNode.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
          }
        }
      }
    }
  }
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}

Fixed version (ground truth):
public void undo(){
  Process process=(Process)node.getProcess();
  process.setActivateSubjob(node,!value,oneComponent);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}
Program: 119548
Project: 119548
Buggy source:
public void redo(){
  componentListChanged.clear();
  this.execute();
}

Fixed version (ground truth):
public void redo(){
  this.execute();
}
Program: 119549
Project: 119549
Buggy source:
public void execute(){
  Process process=(Process)node.getProcess();
  process.setActivateSubjob(node,value,oneComponent);
  if (!value) {
    List<? extends INode> graphicalNodes=process.getGraphicalNodes();
    for (    INode gNode : graphicalNodes) {
      if (gNode == this.node) {
        continue;
      }
      List<? extends IElementParameter> elementParameters=gNode.getElementParameters();
      for (      IElementParameter param : elementParameters) {
        EParameterFieldType fieldType=param.getFieldType();
        if (EParameterFieldType.COMPONENT_LIST == fieldType) {
          Object value=param.getValue();
          if (node.getUniqueName().equals(value)) {
            param.setValue("String_Node_Str");
            gNode.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
            String key=gNode.getUniqueName() + "String_Node_Str" + param.getName();
            componentListChanged.put(key,value);
          }
        }
      }
    }
  }
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}

Fixed version (ground truth):
public void execute(){
  Process process=(Process)node.getProcess();
  process.setActivateSubjob(node,value,oneComponent);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}
Program: 119551
Project: 119551
Buggy source:
@Override public void redo(){
  componentListChanged.clear();
  this.execute();
}

Fixed version (ground truth):
@Override public void redo(){
  this.execute();
}
Program: 119553
Project: 119553
Buggy source:
@Override public void refresh(IElementParameter param,boolean check){
  CCombo combo=(CCombo)hashCurControls.get(getParameterName(param));
  if (combo == null || combo.isDisposed()) {
    return;
  }
  updateComponentList(elem,param);
  String[] curComponentNameList=param.getListItemsDisplayName();
  String[] curComponentValueList=(String[])param.getListItemsValue();
  Object value=param.getValue();
  boolean listContainValue=false;
  int numValue=0;
  for (int i=0; i < curComponentValueList.length && !listContainValue; i++) {
    if (curComponentValueList[i].equals(value)) {
      listContainValue=true;
      numValue=i;
    }
  }
  if (param.isContextMode()) {
    combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
    combo.setEnabled(false);
    combo.setText((String)value);
  }
 else {
    combo.setItems(curComponentNameList);
    if (!listContainValue) {
      elem.setPropertyValue(getParameterName(param),"String_Node_Str");
    }
 else {
      combo.setText(curComponentNameList[numValue]);
    }
  }
}

Fixed version (ground truth):
@Override public void refresh(IElementParameter param,boolean check){
  CCombo combo=(CCombo)hashCurControls.get(getParameterName(param));
  if (combo == null || combo.isDisposed()) {
    return;
  }
  updateComponentList(elem,param);
  String[] curComponentNameList=param.getListItemsDisplayName();
  String[] curComponentValueList=(String[])param.getListItemsValue();
  Object value=param.getValue();
  boolean listContainValue=false;
  int numValue=0;
  for (int i=0; i < curComponentValueList.length && !listContainValue; i++) {
    if (curComponentValueList[i].equals(value)) {
      listContainValue=true;
      numValue=i;
    }
  }
  if (param.isContextMode()) {
    combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
    combo.setEnabled(false);
    combo.setText((String)value);
  }
 else {
    combo.setItems(curComponentNameList);
    if (!listContainValue) {
      if (curComponentNameList.length > 0) {
        elem.setPropertyValue(getParameterName(param),curComponentValueList[0]);
        combo.setText(curComponentNameList[0]);
      }
    }
 else {
      combo.setText(curComponentNameList[numValue]);
    }
  }
}
Program: 119556
Project: 119556
Buggy source:
protected void setConnectionProperty(IConnectionProperty connectionProperty){
  this.connectionProperty=connectionProperty;
  setLineStyle(connectionProperty.getLineStyle());
  Color color=ColorUtils.getCacheColor(connectionProperty.getRGB());
  ResourceDisposeUtil.setAndCheckColor(this,color,true);
}

Fixed version (ground truth):
protected void setConnectionProperty(IConnectionProperty connectionProperty){
  if (connectionProperty == null) {
    return;
  }
  this.connectionProperty=connectionProperty;
  setLineStyle(connectionProperty.getLineStyle());
  Color color=ColorUtils.getCacheColor(connectionProperty.getRGB());
  ResourceDisposeUtil.setAndCheckColor(this,color,true);
}
Program: 119557
Project: 119557
Buggy source:
@Override public void undo(){
  Process process;
  if (nodeList.size() > 0) {
    process=(Process)nodeList.get(0).getProcess();
  }
 else {
    process=(Process)connectionList.get(0).getSource().getProcess();
  }
  process.setActivate(false);
  if (!componentListChanged.isEmpty()) {
    List<? extends INode> graphicalNodes=process.getGraphicalNodes();
    for (    INode node : graphicalNodes) {
      List<? extends IElementParameter> elementParameters=node.getElementParameters();
      for (      IElementParameter param : elementParameters) {
        EParameterFieldType fieldType=param.getFieldType();
        if (EParameterFieldType.COMPONENT_LIST == fieldType) {
          String key=node.getUniqueName() + "String_Node_Str" + param.getName();
          Object object=componentListChanged.get(key);
          if (object != null) {
            param.setValue(object);
            node.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
          }
        }
      }
    }
  }
  dummyMiddleElement(true);
  for (  Node node : nodeList) {
    if (isSameSchemaInputOutput(node)) {
      node.setPropertyValue(EParameterName.DUMMY.getName(),value);
    }
    node.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  for (  Connection connection : connectionList) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  if (connectionList != null && connectionList.size() != 0) {
    if (connIndex < outputs.size()) {
      outputs.remove(this.curConn);
      outputs.add(outputs.size() - deactiveNum,(Connection)object);
    }
    if (connIndex >= outputs.size()) {
      outputs.add(curConn);
    }
    curConn.updateAllId();
  }
  process.setActivate(true);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}

Fixed version (ground truth):
@Override public void undo(){
  Process process;
  if (nodeList.size() > 0) {
    process=(Process)nodeList.get(0).getProcess();
  }
 else {
    process=(Process)connectionList.get(0).getSource().getProcess();
  }
  process.setActivate(false);
  dummyMiddleElement(true);
  for (  Node node : nodeList) {
    if (isSameSchemaInputOutput(node)) {
      node.setPropertyValue(EParameterName.DUMMY.getName(),value);
    }
    node.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  for (  Connection connection : connectionList) {
    connection.setPropertyValue(EParameterName.ACTIVATE.getName(),!value);
  }
  if (connectionList != null && connectionList.size() != 0) {
    if (connIndex < outputs.size()) {
      outputs.remove(this.curConn);
      outputs.add(outputs.size() - deactiveNum,(Connection)object);
    }
    if (connIndex >= outputs.size()) {
      outputs.add(curConn);
    }
    curConn.updateAllId();
  }
  process.setActivate(true);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}
Program: 119558
Project: 119558
Buggy source:
@Override public void redo(){
  componentListChanged.clear();
  this.execute();
}

Fixed version (ground truth):
@Override public void redo(){
  this.execute();
}
Program: 119560
Project: 119560
Buggy source:
public void undo(){
  Process process=(Process)node.getProcess();
  process.setActivateSubjob(node,!value,oneComponent);
  if (!componentListChanged.isEmpty()) {
    List<? extends INode> graphicalNodes=process.getGraphicalNodes();
    for (    INode gNode : graphicalNodes) {
      if (gNode == this.node) {
        continue;
      }
      List<? extends IElementParameter> elementParameters=gNode.getElementParameters();
      for (      IElementParameter param : elementParameters) {
        EParameterFieldType fieldType=param.getFieldType();
        if (EParameterFieldType.COMPONENT_LIST == fieldType) {
          String key=gNode.getUniqueName() + "String_Node_Str" + param.getName();
          Object object=componentListChanged.get(key);
          if (object != null) {
            param.setValue(object);
            gNode.setPropertyValue(EParameterName.UPDATE_COMPONENTS.getName(),Boolean.TRUE);
          }
        }
      }
    }
  }
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}

Fixed version (ground truth):
public void undo(){
  Process process=(Process)node.getProcess();
  process.setActivateSubjob(node,!value,oneComponent);
  process.checkStartNodes();
  process.checkProcess();
  refreshPropertyView();
}
Program: 119561
Project: 119561
Buggy source:
public void redo(){
  componentListChanged.clear();
  this.execute();
}

Fixed version (ground truth):
public void redo(){
  this.execute();
}