nus-yam/ex-repair huggingface dataset:
Program: 147582
Project: 147582
Buggy source:
private static String getModelContent(IRepositoryViewObject viewObj){
  Item item=viewObj.getProperty().getItem();
  IFile file=RepositoryResourceUtil.findReferenceFile(IServerObjectRepositoryType.TYPE_DATAMODEL,item,"String_Node_Str");
  try {
    byte[] bytes=IOUtils.toByteArray(file.getContents());
    String xsd=new String(bytes);
    return xsd;
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
catch (  CoreException e) {
    log.error(e.getMessage(),e);
  }
  return null;
}

Fixed version (ground truth):
private static String getModelContent(IRepositoryViewObject viewObj){
  Item item=viewObj.getProperty().getItem();
  IFile file=RepositoryResourceUtil.findReferenceFile(IServerObjectRepositoryType.TYPE_DATAMODEL,item,"String_Node_Str");
  InputStream xsdFileStream=null;
  try {
    xsdFileStream=file.getContents();
    byte[] bytes=IOUtils.toByteArray(xsdFileStream);
    String xsd=new String(bytes);
    return xsd;
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
catch (  CoreException e) {
    log.error(e.getMessage(),e);
  }
 finally {
    if (xsdFileStream != null) {
      try {
        xsdFileStream.close();
      }
 catch (      IOException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
  return null;
}
Program: 147583
Project: 147583
Buggy source:
private static String getModelContent(IRepositoryViewObject viewObj){
  Item item=viewObj.getProperty().getItem();
  IFile file=RepositoryResourceUtil.findReferenceFile(IServerObjectRepositoryType.TYPE_DATAMODEL,item,"String_Node_Str");
  try {
    byte[] bytes=IOUtils.toByteArray(file.getContents());
    String xsd=new String(bytes);
    return xsd;
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
catch (  CoreException e) {
    log.error(e.getMessage(),e);
  }
  return null;
}

Fixed version (ground truth):
private static String getModelContent(IRepositoryViewObject viewObj){
  Item item=viewObj.getProperty().getItem();
  IFile file=RepositoryResourceUtil.findReferenceFile(IServerObjectRepositoryType.TYPE_DATAMODEL,item,"String_Node_Str");
  InputStream xsdFileStream=null;
  try {
    xsdFileStream=file.getContents();
    byte[] bytes=IOUtils.toByteArray(xsdFileStream);
    String xsd=new String(bytes);
    return xsd;
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
catch (  CoreException e) {
    log.error(e.getMessage(),e);
  }
 finally {
    if (xsdFileStream != null) {
      try {
        xsdFileStream.close();
      }
 catch (      IOException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
  return null;
}
Program: 147584
Project: 147584
Buggy source:
/** 
 * DOC hbhong RemoveFromRepositoryAction constructor comment.
 * @param text
 */
public RemoveFromRepositoryAction(){
  super(Messages.RemoveFromRepositoryAction_removeFromRepository);
  setImageDescriptor(ImageCache.getImage(EImage.DELETE_OBJ.getPath()));
}

Fixed version (ground truth):
/** 
 * DOC hbhong RemoveFromRepositoryAction constructor comment.
 * @param text
 */
public RemoveFromRepositoryAction(){
  super("String_Node_Str");
  setImageDescriptor(ImageCache.getImage(EImage.DELETE_OBJ.getPath()));
}
Program: 147585
Project: 147585
Buggy source:
@Override protected void doRun(){
  List<Object> selectedObject=getSelectedObject();
  int size=selectedObject.size();
  if (size > 0) {
    if (hasOpenedObject(selectedObject)) {
      MessageDialog.openWarning(getShell(),Messages.RemoveFromRepositoryAction_Title,Messages.RemoveFromRepositoryAction_CanNotDeleteFolder);
      return;
    }
    if (!MessageDialog.openConfirm(getShell(),Messages.RemoveFromRepositoryAction_Title,Messages.bind(Messages.RemoveFromRepositoryAction_confirm,size,size > 1 ? Messages.RemoveFromRepositoryAction_instances : Messages.RemoveFromRepositoryAction_instance))) {
      return;
    }
  }
  selectedObject.removeAll(lockedObjs);
  if (!handleDeleteEvent(selectedObject)) {
    return;
  }
  for (  Object obj : selectedObject) {
    if (obj instanceof IRepositoryViewObject) {
      IRepositoryViewObject viewObj=(IRepositoryViewObject)obj;
      if (isServerObject(viewObj)) {
        removeServerObject(viewObj);
      }
 else       if (RepositoryResourceUtil.hasContainerItem(obj,FolderType.FOLDER_LITERAL)) {
        removeFolderObject(viewObj);
      }
    }
  }
  try {
    factory.saveProject(ProjectManager.getInstance().getCurrentProject());
  }
 catch (  PersistenceException e) {
    log.error(e.getMessage(),e);
  }
  commonViewer.refresh();
  removed.clear();
  if (lockedObjs.size() > 0) {
    MessageDialog.openError(getShell(),Messages.AbstractRepositoryAction_lockedObjTitle,getAlertMsg());
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  List<Object> selectedObject=getSelectedObject();
  int size=selectedObject.size();
  if (size > 0) {
    if (hasOpenedObject(selectedObject)) {
      warn();
      return;
    }
    if (!confirm(size)) {
      return;
    }
  }
  selectedObject.removeAll(lockedObjs);
  if (!handleDeleteEvent(selectedObject)) {
    return;
  }
  for (  Object obj : selectedObject) {
    if (obj instanceof IRepositoryViewObject) {
      IRepositoryViewObject viewObj=(IRepositoryViewObject)obj;
      if (isServerObject(viewObj)) {
        removeServerObject(viewObj);
      }
 else       if (RepositoryResourceUtil.hasContainerItem(obj,FolderType.FOLDER_LITERAL)) {
        removeFolderObject(viewObj);
      }
    }
  }
  try {
    factory.saveProject(ProjectManager.getInstance().getCurrentProject());
  }
 catch (  PersistenceException e) {
    log.error(e.getMessage(),e);
  }
  commonViewer.refresh();
  removed.clear();
  if (lockedObjs.size() > 0) {
    MessageDialog.openError(getShell(),Messages.AbstractRepositoryAction_lockedObjTitle,getAlertMsg());
  }
}
Program: 147586
Project: 147586
Buggy source:
/** 
 * DOC hbhong RemoveFromRepositoryAction constructor comment.
 * @param text
 */
public RenameObjectAction(){
  super(Messages.RenameObjectAction_rename);
  setImageDescriptor(ImageCache.getImage(EImage.RENAME.getPath()));
}

Fixed version (ground truth):
/** 
 * DOC hbhong RemoveFromRepositoryAction constructor comment.
 * @param text
 */
public RenameObjectAction(){
  super("String_Node_Str");
  setImageDescriptor(ImageCache.getImage(EImage.RENAME.getPath()));
}
Program: 147591
Project: 147591
Buggy source:
@Test public void testCreateDeletedFolderViewObject() throws Exception {
  ERepositoryObjectType type=null;
  String path="String_Node_Str";
  String folderName="String_Node_Str";
  List<IRepositoryViewObject> children=new ArrayList<IRepositoryViewObject>();
  List<IRepositoryViewObject> spychildren=PowerMockito.spy(children);
  FolderRepositoryObject mockParentFolderObject=mock(FolderRepositoryObject.class);
  assertEquals(folderName,mockParentFolderObject.getClass().getName());
  when(mockParentFolderObject.getChildren()).thenReturn(spychildren);
  PowerMockito.mockStatic(ContainerCacheService.class);
  PowerMockito.doNothing().when(ContainerCacheService.class,"String_Node_Str",Mockito.any(IRepositoryViewObject.class));
  FolderRepositoryObject deletedFolderViewObject=RepositoryResourceUtil.createDeletedFolderViewObject(type,path,folderName,mockParentFolderObject);
  assertNotNull(deletedFolderViewObject);
}

Fixed version (ground truth):
@Test public void testCreateDeletedFolderViewObject() throws Exception {
  ERepositoryObjectType type=null;
  String path="String_Node_Str";
  String folderName="String_Node_Str";
  List<IRepositoryViewObject> children=new ArrayList<IRepositoryViewObject>();
  List<IRepositoryViewObject> spychildren=PowerMockito.spy(children);
  StubFolderRepositoryObject mockParentFolderObject=mock(StubFolderRepositoryObject.class);
  when(mockParentFolderObject.getChildren()).thenReturn(spychildren);
  PowerMockito.mockStatic(ContainerCacheService.class);
  PowerMockito.doNothing().when(ContainerCacheService.class,"String_Node_Str",Mockito.any(IRepositoryViewObject.class));
  FolderRepositoryObject deletedFolderViewObject=RepositoryResourceUtil.createDeletedFolderViewObject(type,path,folderName,mockParentFolderObject);
  assertNotNull(deletedFolderViewObject);
}
Program: 147592
Project: 147592
Buggy source:
public static String uploadFileToAppServer(String URL,String localFilename,String username,String password) throws XtentisException {
  HttpUriRequest request=createUploadFileToServerRequest(URL,username,localFilename);
  DefaultHttpClient client=wrapAuthClient(URL,username,password);
  HttpContext preemptiveContext=getPreemptiveContext(URL);
  String errMessage=Messages.Util_21 + "String_Node_Str" + Messages.Util_22+ "String_Node_Str";
  String content=getTextContent(client,request,preemptiveContext,errMessage);
  if (null == content) {
    throw new XtentisException("String_Node_Str");
  }
  return content;
}

Fixed version (ground truth):
public static String uploadFileToAppServer(String URL,String localFilename,String username,String password) throws XtentisException {
  HttpUriRequest request=createUploadFileToServerRequest(URL,username,localFilename);
  DefaultHttpClient client=wrapAuthClient(URL,username,password);
  HttpContext preemptiveContext=getPreemptiveContext(URL);
  authenticate(username,password,request,preemptiveContext);
  String errMessage=Messages.Util_21 + "String_Node_Str" + Messages.Util_22+ "String_Node_Str";
  String content=getTextContent(client,request,preemptiveContext,errMessage);
  if (null == content) {
    throw new XtentisException("String_Node_Str");
  }
  return content;
}
Program: 147593
Project: 147593
Buggy source:
public static String uploadImageFile(String URL,String localFilename,String filename,String imageCatalog,String username,String password,HashMap<String,String> picturePathMap) throws XtentisException {
  HttpUriRequest request=createUploadRequest(URL,username,localFilename,filename,imageCatalog,picturePathMap);
  DefaultHttpClient client=wrapAuthClient(URL,username,password);
  HttpContext preemptiveContext=getPreemptiveContext(URL);
  String errMessage=Messages.Util_25 + "String_Node_Str" + Messages.Util_26+ "String_Node_Str";
  String content=getTextContent(client,request,preemptiveContext,errMessage);
  if (null == content) {
    throw new XtentisException("String_Node_Str");
  }
  if (content.contains("String_Node_Str")) {
    String returnValue=content.substring(content.indexOf("String_Node_Str"),content.indexOf("String_Node_Str") - 1);
    if (picturePathMap != null) {
      File file=new File(localFilename);
      String fileName1=file.getName();
      picturePathMap.put(fileName1,returnValue);
    }
    return returnValue;
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public static String uploadImageFile(String URL,String localFilename,String filename,String imageCatalog,String username,String password,HashMap<String,String> picturePathMap) throws XtentisException {
  HttpUriRequest request=createUploadRequest(URL,username,localFilename,filename,imageCatalog,picturePathMap);
  DefaultHttpClient client=wrapAuthClient(URL,username,password);
  HttpContext preemptiveContext=getPreemptiveContext(URL);
  authenticate(username,password,request,preemptiveContext);
  String errMessage=Messages.Util_25 + "String_Node_Str" + Messages.Util_26+ "String_Node_Str";
  String content=getTextContent(client,request,preemptiveContext,errMessage);
  if (null == content) {
    throw new XtentisException("String_Node_Str");
  }
  if (content.contains("String_Node_Str")) {
    String returnValue=content.substring(content.indexOf("String_Node_Str"),content.indexOf("String_Node_Str") - 1);
    if (picturePathMap != null) {
      File file=new File(localFilename);
      String fileName1=file.getName();
      picturePathMap.put(fileName1,returnValue);
    }
    return returnValue;
  }
 else {
    return "String_Node_Str";
  }
}
Program: 147594
Project: 147594
Buggy source:
/** 
 * Test for: getFolder(ERepositoryObjectType type, Item item)
 */
@Test public void testGetFolder2Args() throws PersistenceException {
  PowerMockito.mockStatic(ProjectManager.class);
  ProjectManager mockProjectManager=mock(ProjectManager.class);
  when(ProjectManager.getInstance()).thenReturn(mockProjectManager);
  Project mockProject=mock(Project.class);
  when(ProjectManager.getInstance().getCurrentProject()).thenReturn(mockProject);
  PowerMockito.mockStatic(ResourceModelUtils.class);
  IProject mockIProject=mock(IProject.class);
  when(ResourceModelUtils.getProject(mockProject)).thenReturn(mockIProject);
  Item mockItem=mock(Item.class);
  ItemState mockState=mock(ItemState.class);
  when(mockItem.getState()).thenReturn(mockState);
  when(mockState.getPath()).thenReturn("String_Node_Str");
  ERepositoryObjectType mockType=mock(ERepositoryObjectType.class);
  PowerMockito.mockStatic(ERepositoryObjectType.class);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn("String_Node_Str");
  IFolder mockFolder=mock(IFolder.class);
  when(mockIProject.getFolder(Mockito.anyString())).thenReturn(mockFolder);
  IFolder folder=RepositoryResourceUtil.getFolder(mockType,mockItem);
  assertEquals(mockFolder,folder);
}

Fixed version (ground truth):
/** 
 * Test for: getFolder(ERepositoryObjectType type, Item item)
 */
@Test public void testGetFolder2Args() throws PersistenceException {
  PowerMockito.mockStatic(ProjectManager.class);
  ProjectManager mockProjectManager=mock(ProjectManager.class);
  when(ProjectManager.getInstance()).thenReturn(mockProjectManager);
  Project mockProject=mock(Project.class);
  when(ProjectManager.getInstance().getCurrentProject()).thenReturn(mockProject);
  PowerMockito.mockStatic(ResourceUtils.class);
  IProject mockIProject=mock(IProject.class);
  when(ResourceUtils.getProject(mockProject)).thenReturn(mockIProject);
  Item mockItem=mock(Item.class);
  ItemState mockState=mock(ItemState.class);
  when(mockItem.getState()).thenReturn(mockState);
  when(mockState.getPath()).thenReturn("String_Node_Str");
  ERepositoryObjectType mockType=mock(ERepositoryObjectType.class);
  PowerMockito.mockStatic(ERepositoryObjectType.class);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn("String_Node_Str");
  IFolder mockFolder=mock(IFolder.class);
  when(mockIProject.getFolder(Mockito.anyString())).thenReturn(mockFolder);
  IFolder folder=RepositoryResourceUtil.getFolder(mockType,mockItem);
  assertEquals(mockFolder,folder);
}
Program: 147597
Project: 147597
Buggy source:
/** 
 * Test for: getFolder(ERepositoryObjectType type)
 */
@Test public void testGetFolder() throws Exception {
  PowerMockito.mockStatic(ProjectManager.class);
  ProjectManager mockProjectManager=mock(ProjectManager.class);
  Project mockProject=mock(Project.class);
  IProject mockIProject=mock(IProject.class);
  when(ProjectManager.getInstance()).thenReturn(mockProjectManager);
  when(ProjectManager.getInstance().getCurrentProject()).thenReturn(mockProject);
  PowerMockito.mockStatic(ResourceModelUtils.class);
  when(ResourceModelUtils.getProject(Mockito.any(Project.class))).thenReturn(mockIProject);
  PowerMockito.mockStatic(ResourceUtils.class);
  IFolder mockFolder=mock(IFolder.class);
  String processFolder="String_Node_Str";
  when(ResourceUtils.getFolder(mockIProject,processFolder,true)).thenReturn(mockFolder);
  PowerMockito.mockStatic(ERepositoryObjectType.class);
  ERepositoryObjectType mockType=mock(ERepositoryObjectType.class);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn(processFolder);
  IFolder folder=RepositoryResourceUtil.getFolder(mockType);
  assertEquals(mockFolder,folder);
}

Fixed version (ground truth):
/** 
 * Test for: getFolder(ERepositoryObjectType type)
 */
@Test public void testGetFolder() throws Exception {
  PowerMockito.mockStatic(ProjectManager.class);
  ProjectManager mockProjectManager=mock(ProjectManager.class);
  when(ProjectManager.getInstance()).thenReturn(mockProjectManager);
  Project mockProject=mock(Project.class);
  when(ProjectManager.getInstance().getCurrentProject()).thenReturn(mockProject);
  PowerMockito.mockStatic(ResourceUtils.class);
  IProject mockIProject=mock(IProject.class);
  when(ResourceUtils.getProject(mockProject)).thenReturn(mockIProject);
  IFolder mockFolder=mock(IFolder.class);
  String processFolder="String_Node_Str";
  when(ResourceUtils.getFolder(mockIProject,processFolder,true)).thenReturn(mockFolder);
  PowerMockito.mockStatic(ERepositoryObjectType.class);
  ERepositoryObjectType mockType=mock(ERepositoryObjectType.class);
  when(ERepositoryObjectType.getFolderName(mockType)).thenReturn(processFolder);
  IFolder folder=RepositoryResourceUtil.getFolder(mockType);
  assertEquals(mockFolder,folder);
}
Program: 147599
Project: 147599
Buggy source:
@Before public void setUp() throws Exception {
  ResourceBundle rb=mock(ResourceBundle.class);
  stub(method(ResourceBundle.class,"String_Node_Str",String.class)).toReturn(rb);
  PowerMockito.mockStatic(JFaceResources.class);
  ImageRegistry registry=mock(ImageRegistry.class);
  when(JFaceResources.getImageRegistry()).thenReturn(registry);
  PowerMockito.mockStatic(DefaultMessagesImpl.class);
  when(DefaultMessagesImpl.getString(anyString())).thenReturn("String_Node_Str");
  IRepositoryResourceUtilExAdapter mockAdapter=PowerMockito.mock(IRepositoryResourceUtilExAdapter.class);
  PowerMockito.mockStatic(ExAdapterManager.class);
  PowerMockito.when(ExAdapterManager.getAdapter(new RepositoryResourceUtil(),IRepositoryResourceUtilExAdapter.class)).thenReturn(mockAdapter);
  PowerMockito.mockStatic(ImageCache.class);
  ImageDescriptor imgDesc=mock(ImageDescriptor.class);
  when(ImageCache.getImage(anyString())).thenReturn(imgDesc);
  PowerMockito.mockStatic(CoreRuntimePlugin.class);
  CoreRuntimePlugin coreRuntimePlugin=mock(CoreRuntimePlugin.class);
  when(CoreRuntimePlugin.getInstance()).thenReturn(coreRuntimePlugin);
  PowerMockito.mockStatic(RepositoryNodeProviderRegistryReader.class);
  RepositoryNodeProviderRegistryReader reader=mock(RepositoryNodeProviderRegistryReader.class);
  PowerMockito.when(RepositoryNodeProviderRegistryReader.getInstance()).thenReturn(reader);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  ResourceBundle rb=mock(ResourceBundle.class);
  stub(method(ResourceBundle.class,"String_Node_Str",String.class)).toReturn(rb);
  PowerMockito.mockStatic(JFaceResources.class);
  ImageRegistry registry=mock(ImageRegistry.class);
  when(JFaceResources.getImageRegistry()).thenReturn(registry);
  PowerMockito.mockStatic(DefaultMessagesImpl.class);
  when(DefaultMessagesImpl.getString(anyString())).thenReturn("String_Node_Str");
  IRepositoryResourceUtilExAdapter mockAdapter=PowerMockito.mock(IRepositoryResourceUtilExAdapter.class);
  PowerMockito.mockStatic(ExAdapterManager.class);
  PowerMockito.when(ExAdapterManager.getAdapter(new RepositoryResourceUtil(),IRepositoryResourceUtilExAdapter.class)).thenReturn(mockAdapter);
  PowerMockito.mockStatic(CoreRuntimePlugin.class);
  CoreRuntimePlugin coreRuntimePlugin=mock(CoreRuntimePlugin.class);
  when(CoreRuntimePlugin.getInstance()).thenReturn(coreRuntimePlugin);
  PowerMockito.mockStatic(RepositoryNodeProviderRegistryReader.class);
  RepositoryNodeProviderRegistryReader reader=mock(RepositoryNodeProviderRegistryReader.class);
  PowerMockito.when(RepositoryNodeProviderRegistryReader.getInstance()).thenReturn(reader);
}
Program: 147600
Project: 147600
Buggy source:
public void fireDirtyPropChange(){
  firePropertyChange(PROP_DIRTY);
}

Fixed version (ground truth):
public void fireDirtyPropChange(){
  getdMainPage().firePropertyChange();
}
Program: 147601
Project: 147601
Buggy source:
public void selectionChanged(SelectionChangedEvent event){
  boolean isSourcePage=false;
  if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null) {
    IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (page.getActivePart() instanceof XSDEditor) {
      if (getActiveEditor() instanceof StructuredTextEditor) {
        isSourcePage=true;
      }
    }
 else {
      return;
    }
  }
  if (isSourcePage) {
    ISelection selection=getDataModelEditorPage().getSelectionProvider().getSelection();
    if (selection instanceof IStructuredSelection) {
      List otherModelObjectList=new ArrayList();
      for (Iterator i=((IStructuredSelection)selection).iterator(); i.hasNext(); ) {
        Object modelObject=i.next();
        Object otherModelObject=getObjectForOtherModel(modelObject);
        if (otherModelObject != null) {
          otherModelObjectList.add(otherModelObject);
        }
      }
      if (!otherModelObjectList.isEmpty()) {
        StructuredSelection nodeSelection=new StructuredSelection(otherModelObjectList);
        getTextEditor().getSelectionProvider().setSelection(nodeSelection);
      }
    }
  }
}

Fixed version (ground truth):
public void selectionChanged(SelectionChangedEvent event){
  boolean isSourcePage=false;
  IWorkbenchWindow window=PlatformUI.getWorkbench().getActiveWorkbenchWindow();
  if (window != null && window.getActivePage() != null) {
    IWorkbenchPage page=window.getActivePage();
    if (page.getActivePart() instanceof XSDEditor) {
      if (getActiveEditor() instanceof StructuredTextEditor) {
        isSourcePage=true;
      }
    }
 else {
      return;
    }
  }
  if (isSourcePage) {
    ISelection selection=getDataModelEditorPage().getSelectionProvider().getSelection();
    if (selection instanceof IStructuredSelection) {
      List otherModelObjectList=new ArrayList();
      for (Iterator i=((IStructuredSelection)selection).iterator(); i.hasNext(); ) {
        Object modelObject=i.next();
        Object otherModelObject=getObjectForOtherModel(modelObject);
        if (otherModelObject != null) {
          otherModelObjectList.add(otherModelObject);
        }
      }
      if (!otherModelObjectList.isEmpty()) {
        StructuredSelection nodeSelection=new StructuredSelection(otherModelObjectList);
        getTextEditor().getSelectionProvider().setSelection(nodeSelection);
      }
    }
  }
}
Program: 147602
Project: 147602
Buggy source:
private void checkMenuEntry(WSMenuEntry entry,WSMenuEntryE entryE){
  assertEquals(entry.getApplication(),entryE.getApplication());
  assertEquals(entry.getContext(),entryE.getContext());
  assertEquals(entry.getIcon(),entryE.getIcon());
  assertEquals(entry.getId(),entryE.getId());
  List<Descriptions> ds=entry.getDescriptions();
  EList<WSMenuMenuEntriesDescriptionsE> des=entryE.getDescriptions();
  if (ds != null) {
    for (int i=0; i < ds.size(); i++) {
      checkDesc(ds.get(i),des.get(i));
    }
  }
}

Fixed version (ground truth):
private void checkMenuEntry(WSMenuEntry entry,WSMenuEntryE entryE){
  assertEquals(entry.getApplication(),entryE.getApplication());
  assertEquals(entry.getContext(),entryE.getContext());
  assertEquals(entry.getIcon(),entryE.getIcon());
  assertEquals(entry.getId(),entryE.getId());
  List<WSMenuMenuEntriesDescriptions> ds=entry.getDescriptions();
  EList<WSMenuMenuEntriesDescriptionsE> des=entryE.getDescriptions();
  if (ds != null) {
    for (int i=0; i < ds.size(); i++) {
      checkDesc(ds.get(i),des.get(i));
    }
  }
}
Program: 147603
Project: 147603
Buggy source:
private void checkDesc(Descriptions ds,WSMenuMenuEntriesDescriptionsE des){
  assertEquals(ds.getLabel(),des.getLabel());
  assertEquals(ds.getLanguage(),des.getLanguage());
}

Fixed version (ground truth):
private void checkDesc(WSMenuMenuEntriesDescriptions ds,WSMenuMenuEntriesDescriptionsE des){
  assertEquals(ds.getLabel(),des.getLabel());
  assertEquals(ds.getLanguage(),des.getLanguage());
}
Program: 147604
Project: 147604
Buggy source:
private void initBean(WSMenu menu){
  menu.setDescription("String_Node_Str");
  menu.setName("String_Node_Str");
  List<WSMenuEntry> menuEntries=new ArrayList<WSMenuEntry>();
  WSMenuEntry menuEntry=new WSMenuEntry();
  menuEntry.setApplication("String_Node_Str");
  menuEntry.setContext("String_Node_Str");
  menuEntry.setIcon("String_Node_Str");
  menuEntry.setId("String_Node_Str");
  Descriptions ds=new Descriptions();
  ds.setLabel("String_Node_Str");
  ds.setLanguage("String_Node_Str");
  menuEntry.getDescriptions().add(ds);
  menuEntries.add(menuEntry);
  menuEntry=new WSMenuEntry();
  menuEntry.setApplication("String_Node_Str");
  menuEntry.setContext("String_Node_Str");
  menuEntry.setIcon("String_Node_Str");
  menuEntry.setId("String_Node_Str");
  menuEntries.add(menuEntry);
  menu.getMenuEntries().add(menuEntry);
}

Fixed version (ground truth):
private void initBean(WSMenu menu){
  menu.setDescription("String_Node_Str");
  menu.setName("String_Node_Str");
  List<WSMenuEntry> menuEntries=new ArrayList<WSMenuEntry>();
  WSMenuEntry menuEntry=new WSMenuEntry();
  menuEntry.setApplication("String_Node_Str");
  menuEntry.setContext("String_Node_Str");
  menuEntry.setIcon("String_Node_Str");
  menuEntry.setId("String_Node_Str");
  WSMenuMenuEntriesDescriptions ds=new WSMenuMenuEntriesDescriptions();
  ds.setLabel("String_Node_Str");
  ds.setLanguage("String_Node_Str");
  menuEntry.getDescriptions().add(ds);
  menuEntries.add(menuEntry);
  menuEntry=new WSMenuEntry();
  menuEntry.setApplication("String_Node_Str");
  menuEntry.setContext("String_Node_Str");
  menuEntry.setIcon("String_Node_Str");
  menuEntry.setId("String_Node_Str");
  menuEntries.add(menuEntry);
  menu.getMenuEntries().add(menuEntry);
}
Program: 147605
Project: 147605
Buggy source:
@Test public void testConvertWhereCondition(){
  WSWhereCondition wc=new WSWhereCondition("String_Node_Str",WSWhereOperator.CONTAINS,"String_Node_Str",WSStringPredicate.OR,false);
  String[] lines=Util.convertWhereCondition(wc);
  assertEquals(lines.length,4);
  assertEquals(lines[0],"String_Node_Str");
  assertEquals(lines[1],"String_Node_Str");
  assertEquals(lines[2],"String_Node_Str");
  assertEquals(lines[3],"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testConvertWhereCondition(){
  WSWhereCondition wc=new WSWhereCondition("String_Node_Str",WSWhereOperator.CONTAINS,"String_Node_Str",false,WSStringPredicate.OR);
  String[] lines=Util.convertWhereCondition(wc);
  assertEquals(lines.length,4);
  assertEquals(lines[0],"String_Node_Str");
  assertEquals(lines[1],"String_Node_Str");
  assertEquals(lines[2],"String_Node_Str");
  assertEquals(lines[3],"String_Node_Str");
}
Program: 147606
Project: 147606
Buggy source:
private TreeParent getServerRoot(){
  String serverName="String_Node_Str";
  String universe="String_Node_Str";
  String username="String_Node_Str";
  String password="String_Node_Str";
  String endpointaddress="String_Node_Str";
  TreeParent serverRoot=new TreeParent(serverName,null,TreeObject._SERVER_,endpointaddress,("String_Node_Str".equals(universe) ? "String_Node_Str" : universe + "String_Node_Str") + username + "String_Node_Str"+ (password == null ? "String_Node_Str" : password));
  UserInfo user=new UserInfo();
  user.setUsername(username);
  user.setPassword(password);
  user.setServerUrl(endpointaddress);
  user.setUniverse(universe);
  serverRoot.setUser(user);
  return serverRoot;
}

Fixed version (ground truth):
private TreeParent getServerRoot(){
  String serverName="String_Node_Str";
  String universe="String_Node_Str";
  String username="String_Node_Str";
  String password="String_Node_Str";
  String endpointaddress="String_Node_Str";
  TreeParent serverRoot=new TreeParent(serverName,null,TreeObject._SERVER_,endpointaddress,("String_Node_Str".equals(universe) ? "String_Node_Str" : universe + "String_Node_Str") + username + "String_Node_Str"+ (password == null ? "String_Node_Str" : password));
  UserInfo user=new UserInfo();
  user.setUsername(username);
  user.setPassword(password);
  user.setServerUrl(endpointaddress);
  serverRoot.setUser(user);
  return serverRoot;
}
Program: 147607
Project: 147607
Buggy source:
@Override protected void focusLost(){
  if (validator != null && !validator.validate(xpath.getText())) {
    xpath.setText(oldPath);
  }
  super.focusLost();
}

Fixed version (ground truth):
@Override protected void focusLost(){
  restoreIfInvalid();
  super.focusLost();
}
Program: 147608
Project: 147608
Buggy source:
@Override protected Object doGetValue(){
  ComplexTableViewer.this.datamodelName=xpath.getDataModelName();
  if (context) {
    XpathSelectDialog.setContext(null);
  }
  return xpath.getText();
}

Fixed version (ground truth):
@Override protected Object doGetValue(){
  ComplexTableViewer.this.datamodelName=xpath.getDataModelName();
  if (context) {
    XpathSelectDialog.setContext(null);
  }
  restoreIfInvalid();
  return xpath.getText();
}
Program: 147609
Project: 147609
Buggy source:
private void hookContextMenu(){
  MenuManager menuMgr=new MenuManager();
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditItemAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new DeleteItemsAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,getXObject(),RoutingEngineV2BrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,getXObject(),RoutingEngineV2BrowserMainPage.this.resultsViewer,true));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,getXObject(),RoutingEngineV2BrowserMainPage.this.resultsViewer,false));
    }
  }
);
  Menu menu=menuMgr.createContextMenu(resultsViewer.getControl());
  resultsViewer.getControl().setMenu(menu);
  getSite().registerContextMenu(menuMgr,resultsViewer);
}

Fixed version (ground truth):
private void hookContextMenu(){
  MenuManager menuMgr=new MenuManager();
  menuMgr.setRemoveAllWhenShown(true);
  menuMgr.addMenuListener(new IMenuListener(){
    public void menuAboutToShow(    IMenuManager manager){
      manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditItemAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new DeleteItemsAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,RoutingEngineV2BrowserMainPage.this.resultsViewer));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,RoutingEngineV2BrowserMainPage.this.resultsViewer,true));
      manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,RoutingEngineV2BrowserMainPage.this.resultsViewer,false));
    }
  }
);
  Menu menu=menuMgr.createContextMenu(resultsViewer.getControl());
  resultsViewer.getControl().setMenu(menu);
  getSite().registerContextMenu(menuMgr,resultsViewer);
}
Program: 147610
Project: 147610
Buggy source:
public void menuAboutToShow(IMenuManager manager){
  manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditItemAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this.resultsViewer));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new DeleteItemsAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,getXObject(),RoutingEngineV2BrowserMainPage.this.resultsViewer));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,getXObject(),RoutingEngineV2BrowserMainPage.this.resultsViewer,true));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,getXObject(),RoutingEngineV2BrowserMainPage.this.resultsViewer,false));
}

Fixed version (ground truth):
public void menuAboutToShow(IMenuManager manager){
  manager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new EditItemAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this.resultsViewer));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new DeleteItemsAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,RoutingEngineV2BrowserMainPage.this.resultsViewer));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,RoutingEngineV2BrowserMainPage.this.resultsViewer,true));
  manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS,new ExecuteRoutingOrdersAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(),RoutingEngineV2BrowserMainPage.this,RoutingEngineV2BrowserMainPage.this.resultsViewer,false));
}
Program: 147611
Project: 147611
Buggy source:
public DeleteItemsAction(Shell shell,RoutingEngineV2BrowserMainPage routingEngineV2BrowserMainPage,TreeObject xObject,Viewer viewer){
  this.shell=shell;
  this.routingEngineV2BrowserMainPage=routingEngineV2BrowserMainPage;
  this.xObject=xObject;
  this.viewer=viewer;
  setImageDescriptor(ImageCache.getImage("String_Node_Str"));
  IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
  if (selection.size() == 1) {
    setText(Messages.RoutingEngineV2BrowserMainPage_DelSelectedItem);
  }
 else {
    setText(Messages.bind(Messages.RoutingEngineV2BrowserMainPage_DeleteThese,selection.size()));
  }
  setToolTipText("String_Node_Str" + (selection.size() > 1 ? "String_Node_Str" : TEXT));
}

Fixed version (ground truth):
public DeleteItemsAction(Shell shell,RoutingEngineV2BrowserMainPage routingEngineV2BrowserMainPage,Viewer viewer){
  this.shell=shell;
  this.routingEngineV2BrowserMainPage=routingEngineV2BrowserMainPage;
  this.viewer=viewer;
  setImageDescriptor(ImageCache.getImage("String_Node_Str"));
  IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
  if (selection.size() == 1) {
    setText(Messages.RoutingEngineV2BrowserMainPage_DelSelectedItem);
  }
 else {
    setText(Messages.bind(Messages.RoutingEngineV2BrowserMainPage_DeleteThese,selection.size()));
  }
  setToolTipText("String_Node_Str" + (selection.size() > 1 ? "String_Node_Str" : TEXT));
}
Program: 147612
Project: 147612
Buggy source:
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    monitor.beginTask(Messages.RoutingEngineV2BrowserMainPage_DeletingItems,lineItems.size());
    TMDMService service=Util.getMDMService(xObject);
    int i=0;
    for (    WSRoutingOrderV2 lineItem : lineItems) {
      monitor.subTask(Messages.RoutingEngineV2BrowserMainPage_ProcessingItem + (i++));
      if (monitor.isCanceled()) {
        MessageDialog.openWarning(this.parentShell,Messages.RoutingEngineV2BrowserMainPage_UserCancelDel,Messages.RoutingEngineV2BrowserMainPage_WarningMsg + i + Messages.RoutingEngineV2BrowserMainPage_WarningMsgA+ Messages.RoutingEngineV2BrowserMainPage_WarningMsgB);
        return;
      }
      service.deleteRoutingOrderV2(new WSDeleteRoutingOrderV2(new WSRoutingOrderV2PK(lineItem.getName(),lineItem.getStatus())));
      monitor.worked(1);
    }
    monitor.done();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    if (!Util.handleConnectionException(shell,e,Messages.RoutingEngineV2BrowserMainPage_ErrorDel)) {
      MessageDialog.openError(shell,Messages.RoutingEngineV2BrowserMainPage_ErrorDel,Messages.RoutingEngineV2BrowserMainPage_WarningMsg1 + e.getLocalizedMessage());
    }
  }
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
  try {
    monitor.beginTask(Messages.RoutingEngineV2BrowserMainPage_DeletingItems,lineItems.size());
    if (service != null) {
      int i=0;
      for (      WSRoutingOrderV2 lineItem : lineItems) {
        monitor.subTask(Messages.RoutingEngineV2BrowserMainPage_ProcessingItem + (i++));
        if (monitor.isCanceled()) {
          MessageDialog.openWarning(this.parentShell,Messages.RoutingEngineV2BrowserMainPage_UserCancelDel,Messages.RoutingEngineV2BrowserMainPage_WarningMsg + i + Messages.RoutingEngineV2BrowserMainPage_WarningMsgA+ Messages.RoutingEngineV2BrowserMainPage_WarningMsgB);
          return;
        }
        service.deleteRoutingOrderV2(new WSDeleteRoutingOrderV2(new WSRoutingOrderV2PK(lineItem.getName(),lineItem.getStatus())));
        monitor.worked(1);
      }
    }
    monitor.done();
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    if (!Util.handleConnectionException(shell,e,Messages.RoutingEngineV2BrowserMainPage_ErrorDel)) {
      MessageDialog.openError(shell,Messages.RoutingEngineV2BrowserMainPage_ErrorDel,Messages.RoutingEngineV2BrowserMainPage_WarningMsg1 + e.getLocalizedMessage());
    }
  }
}
Program: 147613
Project: 147613
Buggy source:
public DeleteItemsWithProgress(TreeObject object,Collection<WSRoutingOrderV2> lineItems,Shell shell){
  super();
  this.lineItems=lineItems;
  this.parentShell=shell;
}

Fixed version (ground truth):
public DeleteItemsWithProgress(TMDMService mdmService,Collection<WSRoutingOrderV2> lineItems,Shell shell){
  super();
  this.service=mdmService;
  this.lineItems=lineItems;
  this.parentShell=shell;
}
Program: 147614
Project: 147614
Buggy source:
public ExecuteRoutingOrdersAction(Shell shell,RoutingEngineV2BrowserMainPage routingEngineV2BrowserMainPage,TreeObject xObject,Viewer viewer,boolean synchronously){
  this.shell=shell;
  this.routingEngineV2BrowserMainPage=routingEngineV2BrowserMainPage;
  this.xObject=xObject;
  this.viewer=viewer;
  this.synchronously=synchronously;
  setImageDescriptor(ImageCache.getImage("String_Node_Str"));
  IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
  if (selection.size() == 1) {
    setText(Messages.RoutingEngineV2BrowserMainPage_Text + (synchronously ? Messages.RoutingEngineV2BrowserMainPage_Text2 : Messages.RoutingEngineV2BrowserMainPage_Text3) + Messages.RoutingEngineV2BrowserMainPage_TextA);
  }
 else {
    setText(Messages.RoutingEngineV2BrowserMainPage_Text1 + (synchronously ? Messages.RoutingEngineV2BrowserMainPage_Text2 : Messages.RoutingEngineV2BrowserMainPage_Text3) + Messages.RoutingEngineV2BrowserMainPage_Text1A+ selection.size()+ Messages.RoutingEngineV2BrowserMainPage_Text1B);
  }
  setToolTipText(Messages.RoutingEngineV2BrowserMainPage_ActionTip + (synchronously ? Messages.RoutingEngineV2BrowserMainPage_Text2 : Messages.RoutingEngineV2BrowserMainPage_Text3) + Messages.RoutingEngineV2BrowserMainPage_ActionTipA+ (selection.size() > 1 ? "String_Node_Str" : TEXT));
}

Fixed version (ground truth):
public ExecuteRoutingOrdersAction(Shell shell,RoutingEngineV2BrowserMainPage routingEngineV2BrowserMainPage,Viewer viewer,boolean synchronously){
  this.shell=shell;
  this.routingEngineV2BrowserMainPage=routingEngineV2BrowserMainPage;
  this.viewer=viewer;
  this.synchronously=synchronously;
  setImageDescriptor(ImageCache.getImage("String_Node_Str"));
  IStructuredSelection selection=((IStructuredSelection)viewer.getSelection());
  if (selection.size() == 1) {
    setText(Messages.RoutingEngineV2BrowserMainPage_Text + (synchronously ? Messages.RoutingEngineV2BrowserMainPage_Text2 : Messages.RoutingEngineV2BrowserMainPage_Text3) + Messages.RoutingEngineV2BrowserMainPage_TextA);
  }
 else {
    setText(Messages.RoutingEngineV2BrowserMainPage_Text1 + (synchronously ? Messages.RoutingEngineV2BrowserMainPage_Text2 : Messages.RoutingEngineV2BrowserMainPage_Text3) + Messages.RoutingEngineV2BrowserMainPage_Text1A+ selection.size()+ Messages.RoutingEngineV2BrowserMainPage_Text1B);
  }
  setToolTipText(Messages.RoutingEngineV2BrowserMainPage_ActionTip + (synchronously ? Messages.RoutingEngineV2BrowserMainPage_Text2 : Messages.RoutingEngineV2BrowserMainPage_Text3) + Messages.RoutingEngineV2BrowserMainPage_ActionTipA+ (selection.size() > 1 ? "String_Node_Str" : TEXT));
}
Program: 147615
Project: 147615
Buggy source:
public ExecuteRoutingOrdersWithProgress(TreeObject object,Collection<WSRoutingOrderV2> lineItems,Shell shell){
  super();
  this.xObject=object;
  this.lineItems=lineItems;
  this.parentShell=shell;
}

Fixed version (ground truth):
public ExecuteRoutingOrdersWithProgress(TMDMService tmdmService,Collection<WSRoutingOrderV2> lineItems,Shell shell){
  super();
  this.service=tmdmService;
  this.lineItems=lineItems;
  this.parentShell=shell;
}
Program: 147617
Project: 147617
Buggy source:
public void generateJobTemplate(int type,String processName,String[] returnMessages,boolean enableRedirect,String redirectUrl,List<IMDMJobTemplate> jobTemplates){
  if (type == ITransformerV2NodeConsDef.TYPE_SMARTVIEW) {
    return;
  }
  if (returnMessages == null || returnMessages.length < 2) {
    throw new IllegalArgumentException();
  }
  String infoType=null;
  String pMessage=null;
  if (type == ITransformerV2NodeConsDef.TYPE_BEFOREDEL || type == ITransformerV2NodeConsDef.TYPE_BEFORESAVE) {
    infoType=returnMessages[0];
    pMessage=returnMessages[1];
  }
  if (type == ITransformerV2NodeConsDef.TYPE_ENTITYACTION || type == ITransformerV2NodeConsDef.TYPE_WELCOMEACTION) {
    if (enableRedirect) {
      pMessage="String_Node_Str" + redirectUrl + "String_Node_Str";
    }
 else {
      pMessage="String_Node_Str";
    }
  }
  IValidateService validateService=(IValidateService)GlobalServiceRegister.getDefault().getService(IValidateService.class);
  for (  IMDMJobTemplate job : jobTemplates) {
    boolean result=true;
    if (validateService != null) {
      result=validateService.validateAndAlertObjectExistence(ERepositoryObjectType.PROCESS,processName,"String_Node_Str");
    }
    if (result) {
      job.generateJobTemplate(type,processName,infoType,pMessage);
    }
  }
}

Fixed version (ground truth):
public void generateJobTemplate(int type,String processName,String[] returnMessages,boolean enableRedirect,String redirectUrl,List<IMDMJobTemplate> jobTemplates){
  if (type == ITransformerV2NodeConsDef.TYPE_SMARTVIEW) {
    return;
  }
  if (returnMessages == null || returnMessages.length < 2) {
    throw new IllegalArgumentException();
  }
  String infoType=null;
  String pMessage=null;
  if (type == ITransformerV2NodeConsDef.TYPE_BEFOREDEL || type == ITransformerV2NodeConsDef.TYPE_BEFORESAVE) {
    infoType=returnMessages[0];
    pMessage=returnMessages[1];
  }
  if (type == ITransformerV2NodeConsDef.TYPE_ENTITYACTION || type == ITransformerV2NodeConsDef.TYPE_WELCOMEACTION) {
    if (enableRedirect) {
      pMessage="String_Node_Str" + redirectUrl + "String_Node_Str";
    }
 else {
      pMessage="String_Node_Str";
    }
  }
  IValidateService validateService=(IValidateService)GlobalServiceRegister.getDefault().getService(IValidateService.class);
  for (  IMDMJobTemplate job : jobTemplates) {
    boolean result=true;
    processName=processName.replaceAll("String_Node_Str","String_Node_Str");
    if (validateService != null) {
      result=validateService.validateAndAlertObjectExistence(ERepositoryObjectType.PROCESS,processName,"String_Node_Str");
    }
    if (result) {
      closeEditor(processName);
      job.generateJobTemplate(type,processName,infoType,pMessage);
    }
  }
}
Program: 147618
Project: 147618
Buggy source:
private void refreshJobEditorTitle(Item item){
  String label=item.getProperty().getLabel();
  IWorkbenchPage activePage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  IEditorReference[] editorReferences=activePage.getEditorReferences();
  if (editorReferences != null) {
    for (    IEditorReference editorPart : editorReferences) {
      IEditorInput editorInput=editorPart.getEditor(false).getEditorInput();
      if (editorInput instanceof ProcessEditorInput) {
        ProcessEditorInput processInput=(ProcessEditorInput)editorInput;
        ProcessItem jobItem=(ProcessItem)processInput.getItem();
        MultiPageTalendEditor jobEditor=(MultiPageTalendEditor)editorPart.getEditor(false);
        if (jobItem.getProperty().getLabel().equals(label)) {
          jobEditor.refreshName();
          break;
        }
      }
    }
  }
}

Fixed version (ground truth):
private void refreshJobEditorTitle(Item item){
  String label=item.getProperty().getLabel();
  label=label.replaceAll("String_Node_Str","String_Node_Str");
  IWorkbenchPage activePage=getActivePage();
  IEditorReference[] editorReferences=activePage.getEditorReferences();
  if (editorReferences != null) {
    for (    IEditorReference editorPart : editorReferences) {
      IEditorInput editorInput=editorPart.getEditor(false).getEditorInput();
      if (editorInput instanceof ProcessEditorInput) {
        ProcessEditorInput processInput=(ProcessEditorInput)editorInput;
        ProcessItem jobItem=(ProcessItem)processInput.getItem();
        MultiPageTalendEditor jobEditor=(MultiPageTalendEditor)editorPart.getEditor(false);
        String jobLabel=jobItem.getProperty().getLabel();
        if (jobLabel.equals(label)) {
          jobEditor.refreshName();
          break;
        }
      }
    }
  }
}
Program: 147619
Project: 147619
Buggy source:
@Override protected void doRun(){
  ISelection selection=getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  RepositoryNode node=(RepositoryNode)obj;
  RepositoryObject repositoryObj=new RepositoryObject(node.getObject().getProperty());
  repositoryObj.setRepositoryNode(node.getObject().getRepositoryNode());
  MDMOpenExistVersionProcessWizard wizard=new MDMOpenExistVersionProcessWizard(repositoryObj);
  PropertyManagerWizardDialog dialog=new PropertyManagerWizardDialog(Display.getCurrent().getActiveShell(),wizard);
  dialog.setPageSize(300,250);
  if (dialog.open() == Dialog.OK) {
    if (wizard.getViewObj() != null) {
      obj=wizard.getViewObj();
    }
    if (obj == node.getObject()) {
      MDMRepositoryView.show().getCommonViewer().refresh(obj);
    }
 else {
      MDMRepositoryView.show().getCommonViewer().refresh(node.getParent().getObject());
    }
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  ISelection selection=getSelection();
  Object obj=((IStructuredSelection)selection).getFirstElement();
  RepositoryNode node=(RepositoryNode)obj;
  RepositoryObject repositoryObj=new RepositoryObject(node.getObject().getProperty());
  repositoryObj.setRepositoryNode(node.getObject().getRepositoryNode());
  MDMOpenExistVersionProcessWizard wizard=new MDMOpenExistVersionProcessWizard(repositoryObj);
  WizardDialog dialog=new WizardDialog(Display.getCurrent().getActiveShell(),wizard);
  dialog.setPageSize(300,250);
  if (dialog.open() == Dialog.OK) {
    if (wizard.getViewObj() != null) {
      obj=wizard.getViewObj();
    }
    if (obj == node.getObject()) {
      MDMRepositoryView.show().getCommonViewer().refresh(obj);
    }
 else {
      MDMRepositoryView.show().getCommonViewer().refresh(node.getParent().getObject());
    }
  }
}