nus-yam/ex-repair huggingface dataset:
Program: 123496
Project: 123496
Buggy source:
private String[] replaceStringArrWithElementId(String[] strArr){
  for (int i=0; i < strArr.length; i++) {
    paloelement plElm=alPaloElements.get(i).getElement(strArr[i]);
    if (null == plElm)     strArr[i]="String_Node_Str";
 else     strArr[i]=String.valueOf(plElm.getElementIdentifier());
  }
  return strArr;
}

Fixed version (ground truth):
private String[] replaceStringArrWithElementId(String[] strArr){
  String[] pathArr=new String[alPaloElements.size()];
  paloelement plElm=null;
  for (int i=0; i < alPaloElements.size(); i++) {
    for (int j=0; j < strArr.length; j++) {
      plElm=alPaloElements.get(i).getElement(strArr[j]);
      if (plElm == null && pathArr[i] == null) {
        pathArr[i]="String_Node_Str";
      }
 else       if (plElm != null) {
        pathArr[i]=String.valueOf(plElm.getElementIdentifier());
      }
    }
  }
  return pathArr;
}
Program: 123497
Project: 123497
Buggy source:
private String[] replaceStringArrWithElementId(String[] strArr){
  for (int i=0; i < strArr.length; i++) {
    paloelement plElm=alPaloElements.get(i).getElement(strArr[i]);
    if (null == plElm)     strArr[i]="String_Node_Str";
 else     strArr[i]=String.valueOf(plElm.getElementIdentifier());
  }
  return strArr;
}

Fixed version (ground truth):
private String[] replaceStringArrWithElementId(String[] strArr){
  String[] pathArr=new String[alPaloElements.size()];
  paloelement plElm=null;
  for (int i=0; i < alPaloElements.size(); i++) {
    for (int j=0; j < strArr.length; j++) {
      plElm=alPaloElements.get(i).getElement(strArr[j]);
      if (plElm == null && pathArr[i] == null) {
        pathArr[i]="String_Node_Str";
      }
 else       if (plElm != null) {
        pathArr[i]=String.valueOf(plElm.getElementIdentifier());
      }
    }
  }
  return pathArr;
}
Program: 123500
Project: 123500
Buggy source:
private String[] replaceStringArrWithElementId(String[] strArr){
  String[] pathArr=new String[alPaloElements.size()];
  paloelement plElm=null;
  for (int i=0; i < alPaloElements.size(); i++) {
    for (int j=0; j < strArr.length; j++) {
      plElm=alPaloElements.get(i).getElement(strArr[j]);
      if (plElm == null && pathArr[i] == null) {
        pathArr[i]="String_Node_Str";
      }
 else       if (plElm != null) {
        pathArr[i]=String.valueOf(plElm.getElementIdentifier());
      }
    }
  }
  return pathArr;
}

Fixed version (ground truth):
private String[] replaceStringArrWithElementId(String[] strArr){
  for (int i=0; i < strArr.length; i++) {
    paloelement plElm=alPaloElements.get(i).getElement(strArr[i]);
    if (null == plElm)     strArr[i]="String_Node_Str";
 else     strArr[i]=String.valueOf(plElm.getElementIdentifier());
  }
  return strArr;
}
Program: 123501
Project: 123501
Buggy source:
public void prepareXlsxFile(String fileName) throws Exception {
  File xlsxFile=new File(fileName);
  if (xlsxFile.exists()) {
    if (isAbsY && keepCellFormat) {
      initPreXlsx(fileName);
    }
    InputStream inp=new FileInputStream(fileName);
    wb=WorkbookFactory.create(inp);
    if (appendWorkbook) {
      sheet=wb.getSheet(sheetName);
      if (sheet != null) {
        if (appendSheet) {
          curY=sheet.getLastRowNum() + 1;
        }
 else {
          wb.removeSheetAt(wb.getSheetIndex(sheetName));
          sheet=wb.createSheet(sheetName);
        }
      }
 else {
        sheet=wb.createSheet(sheetName);
      }
    }
 else {
      List<Integer> indexs=new ArrayList<Integer>();
      for (      XSSFSheet sheet : (XSSFWorkbook)wb) {
        indexs.add(wb.getSheetIndex(sheet));
      }
      for (int i=indexs.size() - 1; i >= 0; i--) {
        wb.removeSheetAt(indexs.get(i));
      }
      sheet=wb.createSheet(sheetName);
    }
  }
 else {
    wb=new XSSFWorkbook();
    sheet=wb.createSheet(sheetName);
  }
  if (isAbsY) {
    startX=absX;
    curY=absY;
  }
}

Fixed version (ground truth):
public void prepareXlsxFile(String fileName) throws Exception {
  File xlsxFile=new File(fileName);
  if (xlsxFile.exists()) {
    if (isAbsY && keepCellFormat) {
      initPreXlsx(fileName);
    }
    if (appendWorkbook) {
      InputStream inp=new FileInputStream(fileName);
      wb=WorkbookFactory.create(inp);
      sheet=wb.getSheet(sheetName);
      if (sheet != null) {
        if (appendSheet) {
          curY=sheet.getLastRowNum() + 1;
        }
 else {
          wb.removeSheetAt(wb.getSheetIndex(sheetName));
          sheet=wb.createSheet(sheetName);
        }
      }
 else {
        sheet=wb.createSheet(sheetName);
      }
    }
 else {
      xlsxFile.delete();
      wb=new XSSFWorkbook();
      sheet=wb.createSheet(sheetName);
    }
  }
 else {
    wb=new XSSFWorkbook();
    sheet=wb.createSheet(sheetName);
  }
  if (isAbsY) {
    startX=absX;
    curY=absY;
  }
}
Program: 123502
Project: 123502
Buggy source:
private String[] replaceStringArrWithElementId(String[] strArr){
  String[] pathArr=new String[alPaloElements.size()];
  paloelement plElm=null;
  for (int i=0; i < alPaloElements.size(); i++) {
    for (int j=0; j < strArr.length; j++) {
      plElm=alPaloElements.get(i).getElement(strArr[j]);
      if (plElm == null && pathArr[i] == null) {
        pathArr[i]="String_Node_Str";
      }
 else       if (plElm != null) {
        pathArr[i]=String.valueOf(plElm.getElementIdentifier());
      }
    }
  }
  return pathArr;
}

Fixed version (ground truth):
private String[] replaceStringArrWithElementId(String[] strArr){
  for (int i=0; i < strArr.length; i++) {
    paloelement plElm=alPaloElements.get(i).getElement(strArr[i]);
    if (null == plElm)     strArr[i]="String_Node_Str";
 else     strArr[i]=String.valueOf(plElm.getElementIdentifier());
  }
  return strArr;
}
Program: 123503
Project: 123503
Buggy source:
private void setRepositoryNode(Properties params){
  IRepositoryView view=RepositoryManagerHelper.getRepositoryView();
  if (view != null) {
    Object type=params.get("String_Node_Str");
    if (ERepositoryObjectType.BUSINESS_PROCESS.name().equals(type)) {
      RepositoryNode processNode=((ProjectRepositoryNode)view.getRoot()).getRootRepositoryNode(ERepositoryObjectType.BUSINESS_PROCESS);
      final StructuredViewer viewer=view.getViewer();
      if (viewer instanceof TreeViewer) {
        ((TreeViewer)viewer).expandToLevel(processNode,1);
      }
      this.repositoryNode=processNode;
    }
  }
}

Fixed version (ground truth):
private void setRepositoryNode(Properties params){
  IWorkbenchWindow workbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (null == workbenchWindow) {
    return;
  }
  IWorkbenchPage workbenchPage=workbenchWindow.getActivePage();
  if (null == workbenchPage) {
    return;
  }
  IPerspectiveDescriptor currentPerspective=workbenchPage.getPerspective();
  if (!IBrandingConfiguration.PERSPECTIVE_DI_ID.equals(currentPerspective.getId())) {
    try {
      workbenchWindow.getWorkbench().showPerspective(IBrandingConfiguration.PERSPECTIVE_DI_ID,workbenchWindow);
      workbenchPage=workbenchWindow.getActivePage();
    }
 catch (    WorkbenchException e) {
      ExceptionHandler.process(e);
      return;
    }
  }
  IRepositoryView view=RepositoryManagerHelper.getRepositoryView();
  if (view != null) {
    Object type=params.get("String_Node_Str");
    if (ERepositoryObjectType.BUSINESS_PROCESS.name().equals(type)) {
      RepositoryNode processNode=((ProjectRepositoryNode)view.getRoot()).getRootRepositoryNode(ERepositoryObjectType.BUSINESS_PROCESS);
      final StructuredViewer viewer=view.getViewer();
      if (viewer instanceof TreeViewer) {
        ((TreeViewer)viewer).expandToLevel(processNode,1);
      }
      this.repositoryNode=processNode;
    }
  }
}
Program: 123504
Project: 123504
Buggy source:
private ISelection getSelectedObject(){
  if (params == null) {
    return getSelection();
  }
 else {
    RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(params.getProperty("String_Node_Str"),false);
    IRepositoryView viewPart=getViewPart();
    if (repositoryNode != null && viewPart != null) {
      RepositoryNodeUtilities.expandParentNode(viewPart,repositoryNode);
      return new StructuredSelection(repositoryNode);
    }
    return null;
  }
}

Fixed version (ground truth):
private ISelection getSelectedObject(){
  if (params == null) {
    return getSelection();
  }
 else {
    IWorkbenchWindow workbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (null == workbenchWindow) {
      return null;
    }
    IWorkbenchPage workbenchPage=workbenchWindow.getActivePage();
    if (null == workbenchPage) {
      return null;
    }
    IPerspectiveDescriptor currentPerspective=workbenchPage.getPerspective();
    if (!IBrandingConfiguration.PERSPECTIVE_DI_ID.equals(currentPerspective.getId())) {
      try {
        workbenchWindow.getWorkbench().showPerspective(IBrandingConfiguration.PERSPECTIVE_DI_ID,workbenchWindow);
        workbenchPage=workbenchWindow.getActivePage();
      }
 catch (      WorkbenchException e) {
        ExceptionHandler.process(e);
        return null;
      }
    }
    RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(params.getProperty("String_Node_Str"),false);
    IRepositoryView viewPart=getViewPart();
    if (repositoryNode != null && viewPart != null) {
      RepositoryNodeUtilities.expandParentNode(viewPart,repositoryNode);
      return new StructuredSelection(repositoryNode);
    }
    return null;
  }
}
Program: 123505
Project: 123505
Buggy source:
private void selectRootObject(Properties params){
  IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  if (page != null) {
    String perId=page.getPerspective().getId();
    if ((!"String_Node_Str".equals(perId) || null != perId) && perId.equalsIgnoreCase(PERSPECTIVE_DI_ID)) {
      IRepositoryView view=RepositoryManagerHelper.getRepositoryView();
      if (view != null) {
        Object type=params.get("String_Node_Str");
        if (ERepositoryObjectType.PROCESS.name().equals(type)) {
          IRepositoryNode processNode=((ProjectRepositoryNode)view.getRoot()).getRootRepositoryNode(ERepositoryObjectType.PROCESS);
          if (processNode != null) {
            setWorkbenchPart(view);
            final StructuredViewer viewer=view.getViewer();
            if (viewer instanceof TreeViewer) {
              ((TreeViewer)viewer).expandToLevel(processNode,1);
            }
            viewer.setSelection(new StructuredSelection(processNode));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void selectRootObject(Properties params){
  IWorkbenchWindow workbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (null == workbenchWindow) {
    return;
  }
  IWorkbenchPage workbenchPage=workbenchWindow.getActivePage();
  if (null == workbenchPage) {
    return;
  }
  IPerspectiveDescriptor currentPerspective=workbenchPage.getPerspective();
  if (!IBrandingConfiguration.PERSPECTIVE_DI_ID.equals(currentPerspective.getId())) {
    try {
      workbenchWindow.getWorkbench().showPerspective(IBrandingConfiguration.PERSPECTIVE_DI_ID,workbenchWindow);
      workbenchPage=workbenchWindow.getActivePage();
    }
 catch (    WorkbenchException e) {
      ExceptionHandler.process(e);
      return;
    }
  }
  IRepositoryView view=RepositoryManagerHelper.getRepositoryView();
  if (view != null) {
    Object type=params.get("String_Node_Str");
    if (ERepositoryObjectType.PROCESS.name().equals(type)) {
      IRepositoryNode processNode=((ProjectRepositoryNode)view.getRoot()).getRootRepositoryNode(ERepositoryObjectType.PROCESS);
      if (processNode != null) {
        setWorkbenchPart(view);
        final StructuredViewer viewer=view.getViewer();
        if (viewer instanceof TreeViewer) {
          ((TreeViewer)viewer).expandToLevel(processNode,1);
        }
        viewer.setSelection(new StructuredSelection(processNode));
      }
    }
  }
}
Program: 123506
Project: 123506
Buggy source:
private ISelection getSelectedObject(){
  if (params == null) {
    return getSelection();
  }
 else {
    RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(params.getProperty("String_Node_Str"),false);
    IRepositoryView viewPart=getViewPart();
    if (repositoryNode != null && viewPart != null) {
      RepositoryNodeUtilities.expandParentNode(viewPart,repositoryNode);
      return new StructuredSelection(repositoryNode);
    }
    return null;
  }
}

Fixed version (ground truth):
private ISelection getSelectedObject(){
  if (params == null) {
    return getSelection();
  }
 else {
    IWorkbenchWindow workbenchWindow=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (null == workbenchWindow) {
      return null;
    }
    IWorkbenchPage workbenchPage=workbenchWindow.getActivePage();
    if (null == workbenchPage) {
      return null;
    }
    IPerspectiveDescriptor currentPerspective=workbenchPage.getPerspective();
    if (!IBrandingConfiguration.PERSPECTIVE_DI_ID.equals(currentPerspective.getId())) {
      try {
        workbenchWindow.getWorkbench().showPerspective(IBrandingConfiguration.PERSPECTIVE_DI_ID,workbenchWindow);
        workbenchPage=workbenchWindow.getActivePage();
      }
 catch (      WorkbenchException e) {
        ExceptionHandler.process(e);
        return null;
      }
    }
    RepositoryNode repositoryNode=RepositoryNodeUtilities.getRepositoryNode(params.getProperty("String_Node_Str"),false);
    IRepositoryView viewPart=getViewPart();
    if (repositoryNode != null && viewPart != null) {
      RepositoryNodeUtilities.expandParentNode(viewPart,repositoryNode);
      return new StructuredSelection(repositoryNode);
    }
    return null;
  }
}
Program: 123507
Project: 123507
Buggy source:
private void loadComponentsProvidersFromExtension(){
  providers=new ArrayList<AbstractComponentsProvider>();
  IExtensionRegistry extensionRegistry=Platform.getExtensionRegistry();
  IExtensionPoint extensionPoint=extensionRegistry.getExtensionPoint("String_Node_Str");
  IExtension[] extensions=extensionPoint.getExtensions();
  for (  IExtension extension : extensions) {
    IConfigurationElement[] configurationElements=extension.getConfigurationElements();
    for (    IConfigurationElement configurationElement : configurationElements) {
      String id=configurationElement.getAttribute("String_Node_Str");
      String folderName=configurationElement.getAttribute("String_Node_Str");
      String contributerName=configurationElement.getContributor().getName();
      IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
      if (!brandingService.isPoweredOnlyCamel() && id.equals("String_Node_Str")) {
        folderName="String_Node_Str";
      }
      try {
        AbstractComponentsProvider componentsProvider=(AbstractComponentsProvider)configurationElement.createExecutableExtension("String_Node_Str");
        componentsProvider.setId(id);
        componentsProvider.setFolderName(folderName);
        componentsProvider.setContributer(contributerName);
        providers.add(componentsProvider);
      }
 catch (      CoreException e) {
        log.error(Messages.getString("String_Node_Str") + id,e);
      }
    }
  }
}

Fixed version (ground truth):
private void loadComponentsProvidersFromExtension(){
  if (providers == null) {
    providers=new ArrayList<AbstractComponentsProvider>();
    IExtensionRegistry extensionRegistry=Platform.getExtensionRegistry();
    IExtensionPoint extensionPoint=extensionRegistry.getExtensionPoint("String_Node_Str");
    IExtension[] extensions=extensionPoint.getExtensions();
    for (    IExtension extension : extensions) {
      IConfigurationElement[] configurationElements=extension.getConfigurationElements();
      for (      IConfigurationElement configurationElement : configurationElements) {
        String id=configurationElement.getAttribute("String_Node_Str");
        String folderName=configurationElement.getAttribute("String_Node_Str");
        String contributerName=configurationElement.getContributor().getName();
        IBrandingService brandingService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
        if (!brandingService.isPoweredOnlyCamel() && id.equals("String_Node_Str")) {
          folderName="String_Node_Str";
        }
        try {
          AbstractComponentsProvider componentsProvider=(AbstractComponentsProvider)configurationElement.createExecutableExtension("String_Node_Str");
          componentsProvider.setId(id);
          componentsProvider.setFolderName(folderName);
          componentsProvider.setContributer(contributerName);
          providers.add(componentsProvider);
        }
 catch (        CoreException e) {
          log.error(Messages.getString("String_Node_Str") + id,e);
        }
      }
    }
  }
}
Program: 123508
Project: 123508
Buggy source:
public AbstractComponentsProvider loadUserComponentsProvidersFromExtension(){
  providers=new ArrayList<AbstractComponentsProvider>();
  IExtensionRegistry extensionRegistry=Platform.getExtensionRegistry();
  IExtensionPoint extensionPoint=extensionRegistry.getExtensionPoint("String_Node_Str");
  IExtension[] extensions=extensionPoint.getExtensions();
  for (  IExtension extension : extensions) {
    IConfigurationElement[] configurationElements=extension.getConfigurationElements();
    for (    IConfigurationElement configurationElement : configurationElements) {
      String id=configurationElement.getAttribute("String_Node_Str");
      if ("String_Node_Str".equals(id)) {
        String folderName=configurationElement.getAttribute("String_Node_Str");
        try {
          AbstractComponentsProvider componentsProvider=(AbstractComponentsProvider)configurationElement.createExecutableExtension("String_Node_Str");
          componentsProvider.setId(id);
          componentsProvider.setFolderName(folderName);
          return componentsProvider;
        }
 catch (        CoreException e) {
          log.error(Messages.getString("String_Node_Str") + id,e);
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public AbstractComponentsProvider loadUserComponentsProvidersFromExtension(){
  if (providers == null) {
    loadComponentsProvidersFromExtension();
  }
  for (  AbstractComponentsProvider provider : providers) {
    if ("String_Node_Str".equals(provider.getId())) {
      return provider;
    }
  }
  return null;
}
Program: 123509
Project: 123509
Buggy source:
public ArrayList<AbstractComponentsProvider> getProviders(){
  loadComponentsProvidersFromExtension();
  return providers;
}

Fixed version (ground truth):
public ArrayList<AbstractComponentsProvider> getProviders(){
  loadComponentsProvidersFromExtension();
  return new ArrayList<AbstractComponentsProvider>(providers);
}
Program: 123510
Project: 123510
Buggy source:
/** 
 * @see org.eclipse.jface.wizard.Wizard#addPages()
 */
@Override public void addPages(){
  mainPage=new FolderWizardPage(defaultLabel);
  addPage(mainPage);
  setWindowTitle(Messages.getString("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.wizard.Wizard#addPages()
 */
@Override public void addPages(){
  mainPage=new FolderWizardPage(defaultLabel);
  addPage(mainPage);
  if (defaultLabel != null) {
    setWindowTitle(Messages.getString("String_Node_Str"));
  }
 else {
    setWindowTitle(Messages.getString("String_Node_Str"));
  }
}
Program: 123511
Project: 123511
Buggy source:
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@Override public boolean performFinish(){
  String folderName=mainPage.getName();
  IProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  try {
    if (defaultLabel == null) {
      repositoryFactory.createFolder(type,path,folderName);
    }
 else {
      repositoryFactory.renameFolder(type,path,folderName);
    }
    return true;
  }
 catch (  PersistenceException e) {
    MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
    ExceptionHandler.process(e);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.jface.wizard.Wizard#performFinish()
 */
@Override public boolean performFinish(){
  final String folderName=mainPage.getName();
  final IProxyRepositoryFactory repositoryFactory=ProxyRepositoryFactory.getInstance();
  if (defaultLabel == null) {
    final IWorkspaceRunnable op=new IWorkspaceRunnable(){
      public void run(      IProgressMonitor monitor) throws CoreException {
        try {
          repositoryFactory.createFolder(type,path,folderName);
        }
 catch (        PersistenceException e) {
          throw new CoreException(new Status(IStatus.ERROR,FrameworkUtil.getBundle(this.getClass()).getSymbolicName(),"String_Node_Str",e));
        }
      }
    }
;
    IRunnableWithProgress iRunnableWithProgress=new IRunnableWithProgress(){
      public void run(      final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        IWorkspace workspace=ResourcesPlugin.getWorkspace();
        try {
          ISchedulingRule schedulingRule=workspace.getRoot();
          workspace.run(op,schedulingRule,IWorkspace.AVOID_UPDATE,monitor);
        }
 catch (        CoreException e) {
          throw new InvocationTargetException(e);
        }
      }
    }
;
    try {
      new ProgressMonitorDialog(getShell()).run(true,true,iRunnableWithProgress);
      return true;
    }
 catch (    InvocationTargetException e1) {
      Throwable targetException=e1.getTargetException();
      MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      ExceptionHandler.process(targetException);
    }
catch (    InterruptedException e1) {
    }
  }
 else {
    try {
      repositoryFactory.renameFolder(type,path,folderName);
      return true;
    }
 catch (    PersistenceException e) {
      MessageDialog.openError(getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      ExceptionHandler.process(e);
    }
  }
  return false;
}
Program: 123512
Project: 123512
Buggy source:
private void setMessage(IStatus status){
  String message2=status.getMessage();
  if (IStatus.ERROR == status.getSeverity()) {
    setErrorMessage(message2);
    setMessage("String_Node_Str");
  }
 else {
    if (message2.length() == 0) {
      message2=DESC;
    }
    setMessage(message2);
    setErrorMessage(null);
  }
}

Fixed version (ground truth):
private void setMessage(IStatus status){
  String message2=status.getMessage();
  if (IStatus.ERROR == status.getSeverity()) {
    setErrorMessage(message2);
    setMessage("String_Node_Str");
  }
 else {
    if (message2.length() == 0 && defaultLabel == null) {
      message2=DESC;
    }
    setMessage(message2);
    setErrorMessage(null);
  }
}
Program: 123513
Project: 123513
Buggy source:
/** 
 * Constructs a new NewProjectWizardPage.
 */
public FolderWizardPage(String defaultLabel){
  super("String_Node_Str");
  this.defaultLabel=defaultLabel;
  setTitle(Messages.getString("String_Node_Str"));
  setDescription(DESC);
  nameStatus=createOkStatus();
}

Fixed version (ground truth):
/** 
 * Constructs a new NewProjectWizardPage.
 */
public FolderWizardPage(String defaultLabel){
  super("String_Node_Str");
  this.defaultLabel=defaultLabel;
  setTitle(Messages.getString("String_Node_Str"));
  if (defaultLabel == null) {
    setDescription(DESC);
  }
 else {
    setDescription("String_Node_Str");
  }
  nameStatus=createOkStatus();
}
Program: 123514
Project: 123514
Buggy source:
@Override protected void beforeRefreshTopLevelNode(){
  RepositoryNode topLevelNode=getTopLevelNode();
  if (topLevelNode != null) {
    IRepositoryNode generatedNode=topLevelNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.GENERATED);
    IRepositoryNode clearJobs=generatedNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.JOBS);
    IRepositoryNode clearJoblets=generatedNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.JOBLETS);
    clearJobs.getChildren().clear();
    clearJoblets.getChildren().clear();
    if (generatedNode != null && !topLevelNode.getChildren().contains(topLevelNode)) {
      topLevelNode.getChildren().add(generatedNode);
    }
  }
}

Fixed version (ground truth):
@Override protected void beforeRefreshTopLevelNode(RepositoryNode topLevelNode){
  if (topLevelNode != null) {
    IRepositoryNode generatedNode=topLevelNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.GENERATED);
    IRepositoryNode clearJobs=generatedNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.JOBS);
    IRepositoryNode clearJoblets=generatedNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.JOBLETS);
    clearJobs.getChildren().clear();
    clearJoblets.getChildren().clear();
    if (generatedNode != null && !topLevelNode.getChildren().contains(topLevelNode)) {
      topLevelNode.getChildren().add(generatedNode);
    }
  }
}
Program: 123516
Project: 123516
Buggy source:
@Override protected Request createTargetRequest(){
  CreateNodeConnectionRequest request=new CreateNodeConnectionRequest(getTargetEditPart());
  System.out.println("String_Node_Str");
  return request;
}

Fixed version (ground truth):
@Override protected Request createTargetRequest(){
  CreateNodeConnectionRequest request=new CreateNodeConnectionRequest(getTargetEditPart());
  return request;
}
Program: 123517
Project: 123517
Buggy source:
@Override public void handleDragOver(){
  getCurrentEvent().detail=DND.DROP_NONE;
  getCurrentEvent().feedback=DND.FEEDBACK_NONE;
  updateTargetRequest();
  updateTargetEditPart();
  DropTargetEvent event=getCurrentEvent();
  Object object=TemplateTransfer.getInstance().getObject();
  if (object == null) {
    event.detail=DND.DROP_NONE;
    return;
  }
  if (object instanceof ISash) {
    handleSashDrag(event,(ISash)object);
    return;
  }
  if (!(object instanceof TransferedObject)) {
    event.detail=DND.DROP_NONE;
    return;
  }
  DropContextAnalyzer analyzer=new DropContextAnalyzer((TransferedObject)object,(AbstractGraphicalEditPart)getTargetEditPart(),getDropLocation());
  System.out.println(analyzer.isDropValid());
  if (analyzer.isDropValid()) {
    event.detail=analyzer.getDetail();
    NewNodeCreationFactory factory=new NewNodeCreationFactory(analyzer.getDropType(),null);
    getCreateRequest().setFactory(factory);
  }
  showTargetFeedback();
}

Fixed version (ground truth):
@Override public void handleDragOver(){
  getCurrentEvent().detail=DND.DROP_NONE;
  getCurrentEvent().feedback=DND.FEEDBACK_NONE;
  updateTargetRequest();
  updateTargetEditPart();
  DropTargetEvent event=getCurrentEvent();
  Object object=TemplateTransfer.getInstance().getObject();
  if (object == null) {
    event.detail=DND.DROP_NONE;
    return;
  }
  if (object instanceof ISash) {
    handleSashDrag(event,(ISash)object);
    return;
  }
  if (!(object instanceof TransferedObject)) {
    event.detail=DND.DROP_NONE;
    return;
  }
  DropContextAnalyzer analyzer=new DropContextAnalyzer((TransferedObject)object,(AbstractGraphicalEditPart)getTargetEditPart(),getDropLocation());
  if (analyzer.isDropValid()) {
    event.detail=analyzer.getDetail();
    NewNodeCreationFactory factory=new NewNodeCreationFactory(analyzer.getDropType(),null);
    getCreateRequest().setFactory(factory);
  }
  showTargetFeedback();
}
Program: 123518
Project: 123518
Buggy source:
@Override public void eraseTargetFeedback(Request request){
  if (indicator != null) {
    if (request instanceof CreateNodeConnectionRequest) {
      CreateNodeConnectionRequest rq=(CreateNodeConnectionRequest)request;
      AbstractGraphicalEditPart targetEditPart=(AbstractGraphicalEditPart)rq.getTargetEditPart();
      if (targetEditPart != null && getFeedbackLayer() != null && indicator.getParent() == getFeedbackLayer()) {
        try {
          getFeedbackLayer().remove(indicator);
        }
 catch (        Exception e) {
          System.out.println(e.getStackTrace());
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void eraseTargetFeedback(Request request){
  if (indicator != null) {
    if (request instanceof CreateNodeConnectionRequest) {
      CreateNodeConnectionRequest rq=(CreateNodeConnectionRequest)request;
      AbstractGraphicalEditPart targetEditPart=(AbstractGraphicalEditPart)rq.getTargetEditPart();
      if (targetEditPart != null && getFeedbackLayer() != null && indicator.getParent() == getFeedbackLayer()) {
        try {
          getFeedbackLayer().remove(indicator);
        }
 catch (        Exception e) {
          ExceptionHandler.process(e);
        }
      }
    }
  }
}
Program: 123520
Project: 123520
Buggy source:
private static IPath buildTempCSVFilename(IPath inPath){
  String filename=inPath.lastSegment();
  if (inPath.getFileExtension() != null) {
    filename=filename.substring(0,filename.length() - inPath.getFileExtension().length());
  }
 else {
    int length=filename.length();
    filename=filename.substring(0,length - 1) + "String_Node_Str";
  }
  filename+=CSV_EXT;
  IPath tempPath;
  tempPath=Path.fromOSString(CorePlugin.getDefault().getPreferenceStore().getString(ITalendCorePrefConstants.FILE_PATH_TEMP));
  tempPath=tempPath.append(filename);
  return tempPath;
}

Fixed version (ground truth):
private IPath buildTempCSVFilename(IPath inPath){
  String filename=inPath.lastSegment();
  if (inPath.getFileExtension() != null) {
    filename=filename.substring(0,filename.length() - inPath.getFileExtension().length());
  }
 else {
    int length=filename.length();
    filename=filename.substring(0,length - 1) + "String_Node_Str";
  }
  filename+=CSV_EXT;
  IPath tempPath;
  tempPath=getTmpFolderPath();
  tempPath=tempPath.append(filename);
  return tempPath;
}
Program: 123521
Project: 123521
Buggy source:
public CreateDocChildrenCommand(TransferedObject objects,OutputTreeNodeEditPart targetEditPart,OutputTreeNode createdNode,XmlMapData xmlMapData){
  this.objects=objects;
  this.targetEditPart=targetEditPart;
  this.createdNode=createdNode;
  this.xmlMapData=xmlMapData;
}

Fixed version (ground truth):
public CreateDocChildrenCommand(TransferedObject objects,OutputTreeNodeEditPart targetEditPart,OutputTreeNode createdNode,MapperManager manager){
  this.objects=objects;
  this.targetEditPart=targetEditPart;
  this.createdNode=createdNode;
  this.manager=manager;
  this.xmlMapData=manager.getCopyOfMapData();
}
Program: 123523
Project: 123523
Buggy source:
public InsertNewColumnCommand(TransferedObject objects,EditPart targetEditPart,AbstractNode createdNode,XmlMapData xmlMapData){
  this.objects=objects;
  this.targetEditPart=targetEditPart;
  this.createdNode=createdNode;
  this.xmlMapData=xmlMapData;
}

Fixed version (ground truth):
public InsertNewColumnCommand(TransferedObject objects,EditPart targetEditPart,AbstractNode createdNode,MapperManager manager,DropType dropType){
  this.objects=objects;
  this.targetEditPart=targetEditPart;
  this.createdNode=createdNode;
  this.manager=manager;
  this.xmlMapData=manager.getCopyOfMapData();
  this.dropType=dropType;
}
Program: 123526
Project: 123526
Buggy source:
private void setHttpProxy(Options options){
  String host=System.getProperty("String_Node_Str");
  String port=System.getProperty("String_Node_Str");
  String user=System.getProperty("String_Node_Str");
  String pwd=System.getProperty("String_Node_Str");
  if (host != null) {
    ProxyProperties proxyProperties=new ProxyProperties();
    proxyProperties.setProxyName(host);
    if (port != null)     proxyProperties.setProxyPort(Integer.parseInt(port));
    if (user != null && !"String_Node_Str".equals(user))     proxyProperties.setUserName(user);
    if (pwd != null && !"String_Node_Str".equals(pwd))     proxyProperties.setPassWord(pwd);
    options.setProperty(HTTPConstants.PROXY,proxyProperties);
  }
}

Fixed version (ground truth):
private void setHttpProxy(Options options){
  String httpsHost=System.getProperty("String_Node_Str");
  String httpsPort=System.getProperty("String_Node_Str");
  String httpsUser=System.getProperty("String_Node_Str");
  String httpsPwd=System.getProperty("String_Node_Str");
  if (httpsHost != null) {
    ProxyProperties proxyProperties=new ProxyProperties();
    proxyProperties.setProxyName(httpsHost);
    if (httpsPort != null)     proxyProperties.setProxyPort(Integer.parseInt(httpsPort));
    if (httpsUser != null && !"String_Node_Str".equals(httpsUser))     proxyProperties.setUserName(httpsUser);
    if (httpsPwd != null && !"String_Node_Str".equals(httpsPwd))     proxyProperties.setPassWord(httpsPwd);
    options.setProperty(HTTPConstants.PROXY,proxyProperties);
  }
 else {
    String host=System.getProperty("String_Node_Str");
    String port=System.getProperty("String_Node_Str");
    String user=System.getProperty("String_Node_Str");
    String pwd=System.getProperty("String_Node_Str");
    if (host != null) {
      ProxyProperties proxyProperties=new ProxyProperties();
      proxyProperties.setProxyName(host);
      if (port != null)       proxyProperties.setProxyPort(Integer.parseInt(port));
      if (user != null && !"String_Node_Str".equals(user))       proxyProperties.setUserName(user);
      if (pwd != null && !"String_Node_Str".equals(pwd))       proxyProperties.setPassWord(pwd);
      options.setProperty(HTTPConstants.PROXY,proxyProperties);
    }
 else {
      String socksHost=System.getProperty("String_Node_Str");
      String socksPort=System.getProperty("String_Node_Str");
      String socksUser=System.getProperty("String_Node_Str");
      String socksPwd=System.getProperty("String_Node_Str");
      if (socksHost != null) {
        ProxyProperties proxyProperties=new ProxyProperties();
        proxyProperties.setProxyName(socksHost);
        if (socksPort != null)         proxyProperties.setProxyPort(Integer.parseInt(socksPort));
        if (socksUser != null && !"String_Node_Str".equals(socksUser))         proxyProperties.setUserName(socksUser);
        if (socksPwd != null && !"String_Node_Str".equals(socksPwd))         proxyProperties.setPassWord(socksPwd);
        options.setProperty(HTTPConstants.PROXY,proxyProperties);
      }
    }
  }
}
Program: 123528
Project: 123528
Buggy source:
protected void getChildrenJobAndContextName(ExportFileResource[] allResources,String rootName,List<JobInfo> list,ProcessItem process,String projectName,List<ProcessItem> processedJob,ExportFileResource resource,Map<ExportChoice,Object> exportChoice,String... selectedJobVersion){
  if (processedJob.contains(process)) {
    return;
  }
  processedJob.add(process);
  addJobItem(allResources,process,isOptionChoosed(ExportChoice.needJobItem),resource);
  addDependencies(allResources,process,isOptionChoosed(ExportChoice.needDependencies),resource);
  addSourceCode(allResources,process,isOptionChoosed(ExportChoice.needSourceCode),resource);
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(process);
  for (  JobInfo subjobInfo : subjobInfos) {
    if (list.contains(subjobInfo)) {
      continue;
    }
    list.add(subjobInfo);
    getChildrenJobAndContextName(allResources,rootName,list,subjobInfo.getProcessItem(),projectName,processedJob,resource,exportChoice);
  }
}

Fixed version (ground truth):
protected void getChildrenJobAndContextName(ExportFileResource[] allResources,String rootName,List<JobInfo> list,ProcessItem process,String projectName,List<ProcessItem> processedJob,ExportFileResource resource,Map<ExportChoice,Object> exportChoice,String... selectedJobVersion){
  if (processedJob.contains(process)) {
    return;
  }
  processedJob.add(process);
  addJobItem(allResources,process,isOptionChoosed(ExportChoice.needJobItem),resource);
  addDependencies(allResources,process,isOptionChoosed(ExportChoice.needDependencies),resource);
  addSourceCode(allResources,process,isOptionChoosed(ExportChoice.needSourceCode),resource);
  addDependenciesSourceCode(allResources,resource,isOptionChoosed(ExportChoice.needSourceCode));
  Set<JobInfo> subjobInfos=ProcessorUtilities.getChildrenJobInfo(process);
  for (  JobInfo subjobInfo : subjobInfos) {
    if (list.contains(subjobInfo)) {
      continue;
    }
    list.add(subjobInfo);
    getChildrenJobAndContextName(allResources,rootName,list,subjobInfo.getProcessItem(),projectName,processedJob,resource,exportChoice);
  }
}
Program: 123529
Project: 123529
Buggy source:
private void createInputMetadataColumn(String sourceTreeName,String targetTreeName,String sourceNodeName,String targetNodeName,int index){
  IMetadataTable metadataTarget=null;
  List<? extends IConnection> connections=manager.getMapperComponent().getIncomingConnections();
  for (  IConnection incoming : connections) {
    if (incoming.getName().equals(targetTreeName)) {
      metadataTarget=incoming.getMetadataTable();
    }
  }
  if (metadataTarget != null && sourceTreeName != null) {
    IMetadataColumn columnSource=getSourceColumn(sourceTreeName,sourceNodeName);
    if (columnSource != null) {
      IMetadataColumn createNewColumn=new MetadataColumn(columnSource);
      createNewColumn.setLabel(targetNodeName);
      if (index != -1) {
        metadataTarget.getListColumns().add(index,createNewColumn);
      }
 else {
        metadataTarget.getListColumns().add(createNewColumn);
      }
      manager.getMapperUI().getTabFolderEditors().getInputMetaEditorView().getTableViewerCreator().refresh();
    }
  }
}

Fixed version (ground truth):
private void createInputMetadataColumn(String sourceTreeName,String targetTreeName,String sourceNodeName,String targetNodeName,int index){
  IMetadataTable metadataTarget=null;
  List<IODataComponent> inputs=manager.getMapperComponent().getIODataComponents().getInputs();
  for (  IODataComponent incoming : inputs) {
    if (targetTreeName != null && targetTreeName.equals(incoming.getConnection().getName())) {
      metadataTarget=incoming.getTable();
    }
  }
  if (metadataTarget != null && sourceTreeName != null) {
    IMetadataColumn columnSource=getSourceColumn(sourceTreeName,sourceNodeName);
    if (columnSource != null) {
      IMetadataColumn createNewColumn=new MetadataColumn(columnSource);
      createNewColumn.setLabel(targetNodeName);
      if (index != -1) {
        metadataTarget.getListColumns().add(index,createNewColumn);
      }
 else {
        metadataTarget.getListColumns().add(createNewColumn);
      }
      manager.getMapperUI().getTabFolderEditors().getInputMetaEditorView().getTableViewerCreator().refresh();
    }
  }
}
Program: 123530
Project: 123530
Buggy source:
private IMetadataColumn getSourceColumn(String sourceTreeName,String sourceNodeName){
  List<? extends IConnection> connections=manager.getMapperComponent().getIncomingConnections();
  IMetadataColumn columnSource=null;
  for (  IConnection incoming : connections) {
    if (incoming.getName().equals(sourceTreeName)) {
      IMetadataTable metadataSource=incoming.getMetadataTable();
      for (      IMetadataColumn column : metadataSource.getListColumns()) {
        if (column.getLabel().equals(sourceNodeName)) {
          columnSource=column;
          break;
        }
      }
      break;
    }
  }
  return columnSource;
}

Fixed version (ground truth):
private IMetadataColumn getSourceColumn(String sourceTreeName,String sourceNodeName){
  List<IODataComponent> inputs=manager.getMapperComponent().getIODataComponents().getInputs();
  IMetadataColumn columnSource=null;
  for (  IODataComponent incoming : inputs) {
    if (sourceTreeName != null && sourceTreeName.equals(incoming.getConnection().getName())) {
      IMetadataTable metadataSource=incoming.getTable();
      for (      IMetadataColumn column : metadataSource.getListColumns()) {
        if (column.getLabel().equals(sourceNodeName)) {
          columnSource=column;
          break;
        }
      }
      break;
    }
  }
  return columnSource;
}
Program: 123531
Project: 123531
Buggy source:
@Override protected void outlineShape(Graphics graphics){
  Color color=ColorProviderMapper.getColor(ColorInfo.COLOR_DRAGGING_INSERTION_INDICATOR);
  Point start=new Point(getBounds().x + 5,getBounds().y + 5);
  Point end=new Point(getBounds().x + getBounds().width,getBounds().y + 5);
  graphics.setBackgroundColor(color);
  graphics.setForegroundColor(color);
  graphics.drawLine(start,end);
}

Fixed version (ground truth):
@Override protected void outlineShape(Graphics graphics){
  Color color=ColorProviderMapper.getColor(ColorInfo.COLOR_DRAGGING_INSERTION_INDICATOR);
  Point start=new Point(getBounds().x + 5,getBounds().y + 5);
  Point end=new Point(getBounds().x + getBounds().width - 5,getBounds().y + 5);
  graphics.setBackgroundColor(color);
  graphics.setForegroundColor(color);
  graphics.drawLine(start,end);
  graphics.fillPolygon(new int[]{start.x,start.y,start.x - 5,start.y + 5,start.x - 5,start.y - 5});
  graphics.fillPolygon(new int[]{end.x,end.y,end.x + 5,end.y - 5,end.x + 5,end.y + 5});
}
Program: 123534
Project: 123534
Buggy source:
private File createTmpDirectory() throws IOException {
  File tmpDirectory=null;
  int suffix=0;
  while (tmpDirectory == null || tmpDirectory.exists()) {
    tmpDirectory=new File(SystemUtils.getJavaIoTmpDir(),"String_Node_Str" + suffix);
    suffix++;
  }
  if (!tmpDirectory.mkdir()) {
    throw new IOException(Messages.getString("String_Node_Str",tmpDirectory));
  }
  return tmpDirectory;
}

Fixed version (ground truth):
private File createTmpDirectory() throws IOException {
  File tmpDirectory=null;
  int suffix=0;
  org.talend.core.model.general.Project project=ProjectManager.getInstance().getCurrentProject();
  IProject physProject;
  String tmpFolder=System.getProperty("String_Node_Str");
  try {
    physProject=ResourceModelUtils.getProject(project);
    tmpFolder=physProject.getFolder("String_Node_Str").getLocation().toPortableString();
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
  while (tmpDirectory == null || tmpDirectory.exists()) {
    tmpDirectory=new File(tmpFolder + File.separatorChar + "String_Node_Str"+ suffix);
    suffix++;
  }
  if (!tmpDirectory.mkdir()) {
    throw new IOException(Messages.getString("String_Node_Str",tmpDirectory));
  }
  return tmpDirectory;
}
Program: 123539
Project: 123539
Buggy source:
@Override protected void beforeRefreshTopLevelNode(){
  RepositoryNode topLevelNode=getTopLevelNode();
  if (topLevelNode != null) {
    IRepositoryNode generatedNode=topLevelNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.GENERATED);
    if (generatedNode != null && !topLevelNode.getChildren().contains(topLevelNode)) {
      topLevelNode.getChildren().add(generatedNode);
    }
  }
}

Fixed version (ground truth):
@Override protected void beforeRefreshTopLevelNode(){
  RepositoryNode topLevelNode=getTopLevelNode();
  if (topLevelNode != null) {
    IRepositoryNode generatedNode=topLevelNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.GENERATED);
    IRepositoryNode clearJobs=generatedNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.JOBS);
    IRepositoryNode clearJoblets=generatedNode.getRoot().getRootRepositoryNode(ERepositoryObjectType.JOBLETS);
    clearJobs.getChildren().clear();
    clearJoblets.getChildren().clear();
    if (generatedNode != null && !topLevelNode.getChildren().contains(topLevelNode)) {
      topLevelNode.getChildren().add(generatedNode);
    }
  }
}
Program: 123542
Project: 123542
Buggy source:
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
if (job != null) {
if (job instanceof IProcess2) {
IProcess2 process=(IProcess2)job;
process.getCommandStack().execute(command);
executed=true;
}
}
if (!executed) {
command.execute();
}
if (result.isFromItem() || result.getResultType() == EUpdateResult.JOBLET_UPDATE) {
saveModifiedItem(result);
}
subMonitor.worked(1);
}
}

Fixed version (ground truth):
private static void executeUpdate(UpdateResult result,IProgressMonitor monitor){
  if (result.isReadOnlyProcess()) {
    return;
  }
  Command command=null;
switch (result.getUpdateType()) {
case NODE_PROPERTY:
case NODE_SCHEMA:
case NODE_QUERY:
case NODE_SAP_IDOC:
case NODE_SAP_FUNCTION:
case NODE_VALIDATION_RULE:
    command=new UpdateNodeParameterCommand(result);
  break;
case JOB_PROPERTY_EXTRA:
case JOB_PROPERTY_STATS_LOGS:
case JOB_PROPERTY_HEADERFOOTER:
command=new UpdateMainParameterCommand(result);
break;
case CONTEXT:
command=executeContextUpdates(result);
break;
case CONTEXT_GROUP:
command=executeContextGroupUpdates(result);
break;
case JOBLET_RENAMED:
case JOBLET_SCHEMA:
case RELOAD:
command=executeJobletNodesUpdates(result);
break;
case JOBLET_CONTEXT:
command=new Command(){
}
;
break;
default :
break;
}
if (command != null) {
SubProgressMonitor subMonitor=new SubProgressMonitor(monitor,1 * UpdatesConstants.SCALE,SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
subMonitor.beginTask(UpdatesConstants.EMPTY,1);
subMonitor.subTask(getResultTaskInfor(result));
Object job=result.getJob();
boolean executed=false;
boolean isSaveModifiedItem=false;
if (job != null) {
if (job instanceof IProcess2) {
IProcess2 process=(IProcess2)job;
process.getCommandStack().execute(command);
if (process.getEditor() != null) {
isSaveModifiedItem=true;
}
executed=true;
}
}
if (!executed) {
command.execute();
}
if (result.isFromItem() || !isSaveModifiedItem) {
saveModifiedItem(result);
}
subMonitor.worked(1);
}
}