nus-yam/ex-repair huggingface dataset:
Program: 147850
Project: 147850
Buggy source:
protected void changeDomTree(final TreeParent pObject,String filter){
  String modelDisplay=dataModelCombo.getText();
  if (modelDisplay.length() == 0)   return;
  this.dataModelName=modelDisplay;
  XtentisPort port=null;
  try {
    port=Util.getPort(pObject);
  }
 catch (  XtentisException e3) {
    log.error(e3.getMessage(),e3);
  }
catch (  Exception e3) {
    log.error(e3.getMessage(),e3);
  }
  WSDataModel wsDataModel=null;
  try {
    wsDataModel=port.getDataModel(new WSGetDataModel(new WSDataModelPK(dataModelName)));
  }
 catch (  RemoteException e2) {
    log.error(e2.getMessage(),e2);
  }
  try {
    String schema=wsDataModel.getXsdSchema();
    XSDSchema xsd=Util.createXsdSchema(schema,pObject);
    provideViwerContent(xsd,filter);
  }
 catch (  Exception e1) {
    log.error(e1.getMessage(),e1);
  }
}

Fixed version (ground truth):
protected void changeDomTree(final TreeParent pObject,String filter){
  String modelDisplay=dataModelCombo.getText();
  if (modelDisplay.length() == 0)   return;
  this.dataModelName=modelDisplay;
  XtentisPort port=null;
  try {
    port=Util.getPort(pObject);
  }
 catch (  XtentisException e3) {
    log.error(e3.getMessage(),e3);
  }
catch (  Exception e3) {
    log.error(e3.getMessage(),e3);
  }
  WSDataModel wsDataModel=null;
  String schema=null;
  XSDSchema xsd=null;
  if (port == null) {
    xsd=MDMRepositoryViewExtensionService.getDataModelXsd(pObject,filter,dataModelName);
    provideViwerContent(xsd,filter);
  }
 else {
    try {
      wsDataModel=port.getDataModel(new WSGetDataModel(new WSDataModelPK(dataModelName)));
    }
 catch (    RemoteException e2) {
      log.error(e2.getMessage(),e2);
    }
    try {
      schema=wsDataModel.getXsdSchema();
      xsd=Util.createXsdSchema(schema,pObject);
      provideViwerContent(xsd,filter);
    }
 catch (    Exception e1) {
      log.error(e1.getMessage(),e1);
    }
  }
}
Program: 147851
Project: 147851
Buggy source:
protected XpathSelectDialog getXPathSelectDialog(){
  return new XpathSelectDialog(parent.getShell(),treeParent,Messages.getString("String_Node_Str"),ServerView.show().getSite(),false,null,isAbsoluteXPath);
}

Fixed version (ground truth):
protected XpathSelectDialog getXPathSelectDialog(){
  if (treeParent != null)   return new XpathSelectDialog(parent.getShell(),treeParent,Messages.getString("String_Node_Str"),ServerView.show().getSite(),false,null,isAbsoluteXPath);
 else   return new XpathSelectDialog(parent.getShell(),treeParent,Messages.getString("String_Node_Str"),null,false,null,isAbsoluteXPath);
}
Program: 147853
Project: 147853
Buggy source:
private void importSchemaFromFile(String fileName) throws Exception {
  InputSource source=null;
  Pattern httpUrl=Pattern.compile("String_Node_Str");
  Matcher match=httpUrl.matcher(fileName);
  if (match.matches()) {
    URL url=new URL(fileName);
    String urlContent=IOUtils.toString(url.openConnection().getInputStream());
    urlContent=urlContent.replaceAll("String_Node_Str","String_Node_Str");
    source=new InputSource(IOUtils.toInputStream(urlContent));
    importSchema(source,fileName);
  }
 else {
    String inputType="String_Node_Str";
    if (fileName.lastIndexOf("String_Node_Str") != -1) {
      inputType=fileName.substring(fileName.lastIndexOf("String_Node_Str"));
    }
    if (!inputType.equals("String_Node_Str"))     return;
    File file=new File(fileName);
    source=new InputSource(new FileInputStream(file));
    importSchema(source,file.getAbsolutePath());
  }
}

Fixed version (ground truth):
private void importSchemaFromFile(String fileName) throws Exception {
  InputSource source=null;
  Pattern httpUrl=Pattern.compile("String_Node_Str");
  Matcher match=httpUrl.matcher(fileName);
  if (match.matches()) {
    URL url=new URL(fileName);
    String urlContent=IOUtils.toString(url.openConnection().getInputStream());
    urlContent=urlContent.replaceAll("String_Node_Str","String_Node_Str");
    source=new InputSource(IOUtils.toInputStream(urlContent));
    importSchema(source,fileName);
  }
 else {
    importFromFile(source,fileName);
  }
}
Program: 147854
Project: 147854
Buggy source:
@Override protected String getUrl(){
  return "String_Node_Str" + serverDef.getHost() + "String_Node_Str"+ serverDef.getPort()+ "String_Node_Str";
}

Fixed version (ground truth):
@Override protected String getUrl(){
  return "String_Node_Str";
}
Program: 147857
Project: 147857
Buggy source:
/** 
 * DOC hcw Comment method "removeSelectedText".
 */
private void removeSelectedText(){
  if (control instanceof Text) {
    Text text=((Text)control);
    if (text.getSelectionCount() > 0) {
      Point selection=text.getSelection();
      String content=text.getText().substring(0,selection.x) + text.getText().substring(selection.y);
      insertionPos=text.getSelection().x;
      text.setText(content);
    }
  }
 else   if (control instanceof StyledText) {
    StyledText text=((StyledText)control);
    if (text.getSelectionCount() > 0) {
      Point selection=text.getSelection();
      String content=text.getText().substring(0,selection.x) + text.getText().substring(selection.y);
      insertionPos=text.getSelection().x;
      text.setText(content);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC hcw Comment method "removeSelectedText".
 */
private void removeSelectedText(){
  if (control instanceof Text) {
    Text text=((Text)control);
    if (text.getSelectionCount() > 0) {
      Point selection=text.getSelection();
      String content=text.getText().substring(0,selection.x) + text.getText().substring(selection.y);
      insertionPos=text.getSelection().x;
    }
  }
 else   if (control instanceof StyledText) {
    StyledText text=((StyledText)control);
    if (text.getSelectionCount() > 0) {
      Point selection=text.getSelection();
      String content=text.getText().substring(0,selection.x) + text.getText().substring(selection.y);
      insertionPos=text.getSelection().x;
    }
  }
}
Program: 147858
Project: 147858
Buggy source:
public void createNewView(String viewName){
  RepositoryResourceUtil.removeViewObjectPhysically(IServerObjectRepositoryType.TYPE_VIEW,viewName,null,null);
  createServerObject(viewName);
  refreshRepositoryRoot(IServerObjectRepositoryType.TYPE_VIEW);
}

Fixed version (ground truth):
public void createNewView(String viewName){
  RepositoryResourceUtil.removeViewObjectPhysically(IServerObjectRepositoryType.TYPE_VIEW,viewName,null,null);
  createServerObject(viewName);
  refreshRepositoryRoot(IServerObjectRepositoryType.TYPE_VIEW);
  refreshRepositoryRoot(IServerObjectRepositoryType.TYPE_ROLE);
}
Program: 147859
Project: 147859
Buggy source:
@Override protected void modifyRolesWithAttachedBrowseItem(String browseItem,List<Line> roles) throws RemoteException {
  for (  Line line : roles) {
    List<KeyValue> keyValues=line.keyValues;
    String roleName=keyValues.get(0).value;
    MDMServerObjectItem roleItem=RepositoryQueryService.findServerObjectItemByName(IServerObjectRepositoryType.TYPE_ROLE,roleName);
    if (roleItem != null) {
      IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
      if (factory.isEditableAndLockIfPossible(roleItem)) {
        WSRoleE role=((WSRoleItem)roleItem).getWsRole();
        for (        WSRoleSpecificationE spec : role.getSpecification()) {
          if (spec.getObjectType().equals("String_Node_Str")) {
            EList<WSRoleSpecificationInstanceE> specInstance=spec.getInstance();
            WSRoleSpecificationInstanceE newInstance=MdmserverobjectFactory.eINSTANCE.createWSRoleSpecificationInstanceE();
            newInstance.setInstanceName(browseItem);
            newInstance.setWritable(keyValues.get(1).value.equals("String_Node_Str") ? false : true);
            specInstance.add(newInstance);
            break;
          }
        }
        RepositoryResourceUtil.saveItem(roleItem);
      }
      try {
        factory.unlock(roleItem);
      }
 catch (      PersistenceException e) {
        log.error(e.getMessage(),e);
      }
catch (      LoginException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void modifyRolesWithAttachedBrowseItem(String browseItem,List<Line> roles) throws RemoteException {
  for (  Line line : roles) {
    List<KeyValue> keyValues=line.keyValues;
    String roleName=keyValues.get(0).value;
    MDMServerObjectItem roleItem=RepositoryQueryService.findServerObjectItemByName(IServerObjectRepositoryType.TYPE_ROLE,roleName);
    CommandManager.getInstance().pushCommand(ICommand.CMD_MODIFY,roleItem.getProperty().getId(),roleItem.getMDMServerObject().getName());
    if (roleItem != null) {
      IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
      if (factory.isEditableAndLockIfPossible(roleItem)) {
        WSRoleE role=((WSRoleItem)roleItem).getWsRole();
        for (        WSRoleSpecificationE spec : role.getSpecification()) {
          if (spec.getObjectType().equals("String_Node_Str")) {
            EList<WSRoleSpecificationInstanceE> specInstance=spec.getInstance();
            WSRoleSpecificationInstanceE newInstance=MdmserverobjectFactory.eINSTANCE.createWSRoleSpecificationInstanceE();
            newInstance.setInstanceName(browseItem);
            newInstance.setWritable(keyValues.get(1).value.equals("String_Node_Str") ? false : true);
            specInstance.add(newInstance);
            break;
          }
        }
        RepositoryResourceUtil.saveItem(roleItem);
      }
      try {
        factory.unlock(roleItem);
      }
 catch (      PersistenceException e) {
        log.error(e.getMessage(),e);
      }
catch (      LoginException e) {
        log.error(e.getMessage(),e);
      }
    }
  }
}
Program: 147860
Project: 147860
Buggy source:
protected XpathSelectDialog getNewXpathDlgInstance(){
  return new XpathSelectDialog(table.getShell(),getCurrentTreeParent(),"String_Node_Str",ServerView.show().getSite(),true,getDatamodelName());
}

Fixed version (ground truth):
protected XpathSelectDialog getNewXpathDlgInstance(){
  return new XpathSelectDialog(table.getShell(),getCurrentTreeParent(),Messages.getString("String_Node_Str"),ServerView.show().getSite(),true,getDatamodelName());
}
Program: 147862
Project: 147862
Buggy source:
private void create(){
  composite=toolkit.createComposite(parent,SWT.NO_FOCUS);
  GridLayout layout=new GridLayout(2,false);
  layout.marginWidth=0;
  layout.marginLeft=0;
  layout.marginTop=0;
  layout.marginHeight=0;
  layout.marginBottom=0;
  composite.setLayout(layout);
  text=toolkit.createText(composite,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.LEFT);
  textGD=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  text.setLayoutData(textGD);
  button=toolkit.createButton(composite,"String_Node_Str",SWT.PUSH);
  button.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Shell shell=new Shell(composite.getDisplay(),SWT.BORDER);
      createValidationRuleExcpressDialog(shell);
      dlg.create();
      dlg.getShell().setMaximized(false);
      dlg.setBlockOnOpen(true);
      int ret=dlg.open();
      if (ret == Window.OK) {
        text.setText(dlg.getExpression());
      }
    }
  }
);
  button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  button.setToolTipText("String_Node_Str");
}

Fixed version (ground truth):
private void create(){
  composite=toolkit.createComposite(parent,SWT.NO_FOCUS);
  GridLayout layout=new GridLayout(2,false);
  layout.marginWidth=0;
  layout.marginLeft=0;
  layout.marginTop=0;
  layout.marginHeight=0;
  layout.marginBottom=0;
  composite.setLayout(layout);
  text=toolkit.createText(composite,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.LEFT);
  textGD=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  text.setLayoutData(textGD);
  button=toolkit.createButton(composite,"String_Node_Str",SWT.PUSH);
  button.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Shell shell=new Shell(composite.getDisplay(),SWT.BORDER);
      createValidationRuleExcpressDialog(shell);
      dlg.create();
      dlg.getShell().setMaximized(false);
      dlg.setBlockOnOpen(true);
      int ret=dlg.open();
      if (ret == Window.OK) {
        text.setText(dlg.getExpression());
      }
    }
  }
);
  button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  button.setToolTipText(Messages.getString("String_Node_Str"));
}
Program: 147863
Project: 147863
Buggy source:
public int compare(Viewer theViewer,Object e1,Object e2){
  int cat1=category(e1);
  int cat2=category(e2);
  return cat1 - cat2;
}

Fixed version (ground truth):
@Override public int compare(Viewer theViewer,Object e1,Object e2){
  int cat1=category(e1);
  int cat2=category(e2);
  return cat1 - cat2;
}
Program: 147864
Project: 147864
Buggy source:
public String isValid(String newText){
  if ((newText == null) || "String_Node_Str".equals(newText))   return "String_Node_Str";
  return null;
}

Fixed version (ground truth):
public String isValid(String newText){
  if ((newText == null) || "String_Node_Str".equals(newText))   return Messages.getString("String_Node_Str");
  return null;
}
Program: 147866
Project: 147866
Buggy source:
public int category(Object element){
  if (element instanceof XSDDesc) {
    return ((XSDDesc)element).getType();
  }
  return -1;
}

Fixed version (ground truth):
@Override public int category(Object element){
  if (element instanceof XSDDesc) {
    return ((XSDDesc)element).getType();
  }
  return -1;
}
Program: 147868
Project: 147868
Buggy source:
protected XtentisPort getPort() throws XtentisException {
  SelectServerDefDialog dialog=new SelectServerDefDialog(getShell());
  if (dialog.open() == IDialogConstants.OK_ID) {
    MDMServerDef serverDef=dialog.getSelectedServerDef();
    this.serverDef=serverDef;
    return RepositoryWebServiceAdapter.getXtentisPort(serverDef);
  }
  return null;
}

Fixed version (ground truth):
@Override protected XtentisPort getPort() throws XtentisException {
  SelectServerDefDialog dialog=new SelectServerDefDialog(getShell());
  if (dialog.open() == IDialogConstants.OK_ID) {
    MDMServerDef serverDef=dialog.getSelectedServerDef();
    this.serverDef=serverDef;
    return RepositoryWebServiceAdapter.getXtentisPort(serverDef);
  }
  return null;
}
Program: 147870
Project: 147870
Buggy source:
protected XtentisPort getPort(){
  try {
    return Util.getPort(treeObject);
  }
 catch (  XtentisException e) {
    log.error(e.getMessage(),e);
  }
  return null;
}

Fixed version (ground truth):
protected XtentisPort getPort() throws XtentisException {
  return Util.getPort(treeObject);
}
Program: 147871
Project: 147871
Buggy source:
protected SelectImportedModulesDialog createSelectImportedModulesDialog(){
  return new SelectImportedModulesDialog(getSite().getShell(),xsdSchema,xobject,"String_Node_Str");
}

Fixed version (ground truth):
protected SelectImportedModulesDialog createSelectImportedModulesDialog(){
  return new SelectImportedModulesDialog(getSite().getShell(),xsdSchema,xobject,Messages.getString("String_Node_Str"));
}
Program: 147872
Project: 147872
Buggy source:
public void activateEditor(IWorkbenchPage aPage,IStructuredSelection selection){
  initOpenAction();
  openAction.selectionChanged(selection);
  for (  IEditorPart editor : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditors()) {
    if (editor instanceof XObjectEditor2) {
      if (selection.getFirstElement() == ((XObjectEditorInput2)editor.getEditorInput()).getViewObject()) {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(editor);
      }
    }
    if (editor instanceof XSDEditor2) {
      if (selection.getFirstElement() == ((XSDEditorInput2)editor.getEditorInput()).getViewObject()) {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(editor);
      }
    }
  }
}

Fixed version (ground truth):
public void activateEditor(IWorkbenchPage aPage,IStructuredSelection selection){
  initOpenAction();
  openAction.selectionChanged(selection);
}
Program: 147873
Project: 147873
Buggy source:
public void update(ViewerCell cell){
  Object element=cell.getElement();
  if (element instanceof XSDDesc) {
    XSDDesc xsdDesc=(XSDDesc)element;
    cell.setText(xsdDesc.getURL());
    cell.setImage(xsdDesc.getImage());
  }
 else {
    cell.setText("String_Node_Str");
  }
  super.update(cell);
}

Fixed version (ground truth):
@Override public void update(ViewerCell cell){
  Object element=cell.getElement();
  if (element instanceof XSDDesc) {
    XSDDesc xsdDesc=(XSDDesc)element;
    cell.setText(xsdDesc.getURL());
    cell.setImage(xsdDesc.getImage());
  }
 else {
    cell.setText("String_Node_Str");
  }
  super.update(cell);
}
Program: 147875
Project: 147875
Buggy source:
protected void measure(Event event,Object element){
  super.measure(event,element);
}

Fixed version (ground truth):
@Override protected void measure(Event event,Object element){
  super.measure(event,element);
}
Program: 147876
Project: 147876
Buggy source:
protected Control createButtonBar(Composite parent){
  Control control=super.createButtonBar(parent);
  getButton(IDialogConstants.OK_ID).setEnabled(false);
  delLabelButton.setEnabled(false);
  return control;
}

Fixed version (ground truth):
@Override protected Control createButtonBar(Composite parent){
  Control control=super.createButtonBar(parent);
  getButton(IDialogConstants.OK_ID).setEnabled(false);
  delLabelButton.setEnabled(false);
  return control;
}
Program: 147878
Project: 147878
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  Shell shell=new Shell(composite.getDisplay(),SWT.BORDER);
  dlg=new ValidationRuleExcpressDialog(shell,treeParent,"String_Node_Str",text.getText(),conceptName,false,true);
  dlg.create();
  dlg.getShell().setMaximized(false);
  dlg.setBlockOnOpen(true);
  int ret=dlg.open();
  if (ret == Window.OK) {
    text.setText(dlg.getExpression());
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  Shell shell=new Shell(composite.getDisplay(),SWT.BORDER);
  createValidationRuleExcpressDialog(shell);
  dlg.create();
  dlg.getShell().setMaximized(false);
  dlg.setBlockOnOpen(true);
  int ret=dlg.open();
  if (ret == Window.OK) {
    text.setText(dlg.getExpression());
  }
}
Program: 147879
Project: 147879
Buggy source:
private void create(){
  composite=toolkit.createComposite(parent,SWT.NO_FOCUS);
  GridLayout layout=new GridLayout(2,false);
  layout.marginWidth=0;
  layout.marginLeft=0;
  layout.marginTop=0;
  layout.marginHeight=0;
  layout.marginBottom=0;
  composite.setLayout(layout);
  text=toolkit.createText(composite,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.LEFT);
  textGD=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  text.setLayoutData(textGD);
  button=toolkit.createButton(composite,"String_Node_Str",SWT.PUSH);
  button.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Shell shell=new Shell(composite.getDisplay(),SWT.BORDER);
      dlg=new ValidationRuleExcpressDialog(shell,treeParent,"String_Node_Str",text.getText(),conceptName,false,true);
      dlg.create();
      dlg.getShell().setMaximized(false);
      dlg.setBlockOnOpen(true);
      int ret=dlg.open();
      if (ret == Window.OK) {
        text.setText(dlg.getExpression());
      }
    }
  }
);
  button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  button.setToolTipText("String_Node_Str");
}

Fixed version (ground truth):
private void create(){
  composite=toolkit.createComposite(parent,SWT.NO_FOCUS);
  GridLayout layout=new GridLayout(2,false);
  layout.marginWidth=0;
  layout.marginLeft=0;
  layout.marginTop=0;
  layout.marginHeight=0;
  layout.marginBottom=0;
  composite.setLayout(layout);
  text=toolkit.createText(composite,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.LEFT);
  textGD=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  text.setLayoutData(textGD);
  button=toolkit.createButton(composite,"String_Node_Str",SWT.PUSH);
  button.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      Shell shell=new Shell(composite.getDisplay(),SWT.BORDER);
      createValidationRuleExcpressDialog(shell);
      dlg.create();
      dlg.getShell().setMaximized(false);
      dlg.setBlockOnOpen(true);
      int ret=dlg.open();
      if (ret == Window.OK) {
        text.setText(dlg.getExpression());
      }
    }
  }
);
  button.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
  button.setToolTipText("String_Node_Str");
}
Program: 147880
Project: 147880
Buggy source:
public String[] getGlobalInfos(){
  if (propSection.getTreeObject() == null)   return new String[0];
  if (propSection.getTreeObject().getServerRoot() == null) {
    if (typeCode == TreeObject.ROLE)     return MDMRepositoryViewExtensionService.findAllRoleNames().toArray(new String[0]);
    if (typeCode == TreeObject.WORKFLOW_PROCESS)     return MDMRepositoryViewExtensionService.findAllWorkflowNames().toArray(new String[0]);
  }
  return Util.getChildren(propSection.getTreeObject().getServerRoot(),typeCode).toArray(new String[0]);
}

Fixed version (ground truth):
public String[] getGlobalInfos(){
  if (propSection.getTreeObject() == null)   return new String[0];
  if (propSection.getTreeObject().getServerRoot() == null) {
    if (typeCode == TreeObject.ROLE)     return MDMRepositoryViewExtensionService.findAllRoleNames().toArray(new String[0]);
    if (typeCode == TreeObject.WORKFLOW_PROCESS)     return MDMRepositoryViewExtensionService.findAllWorkflowNames().toArray(new String[0]);
    if (typeCode == TreeObject.DATA_MODEL)     return MDMRepositoryViewExtensionService.findAllDataModelNames().toArray(new String[0]);
  }
  return Util.getChildren(propSection.getTreeObject().getServerRoot(),typeCode).toArray(new String[0]);
}
Program: 147881
Project: 147881
Buggy source:
public SelectImportedModulesDialog(Shell parentShell,XSDSchema schema,TreeObject treeObj,String title){
  super(parentShell);
  this.shell=parentShell;
  this.treeObject=treeObj;
  this.title=title;
  this.xsdSchema=schema;
  String endpointIpAddress=treeObject.getEndpointIpAddress();
  if (endpointIpAddress != null && endpointIpAddress.length() > 0) {
    local_mdm_url=endpointIpAddress + "String_Node_Str";
  }
}

Fixed version (ground truth):
public SelectImportedModulesDialog(Shell parentShell,XSDSchema schema,TreeObject treeObj,String title){
  super(parentShell);
  this.shell=parentShell;
  this.treeObject=treeObj;
  this.title=title;
  this.xsdSchema=schema;
  String endpointIpAddress=treeObject.getEndpointIpAddress();
  if (endpointIpAddress != null && endpointIpAddress.length() > 0) {
    url=endpointIpAddress + "String_Node_Str";
  }
}
Program: 147883
Project: 147883
Buggy source:
private void removeServerObject(IRepositoryViewObject viewObj){
  try {
    Item item=viewObj.getProperty().getItem();
    IEditorReference ref=RepositoryResourceUtil.isOpenedInEditor((IRepositoryViewObject)viewObj);
    if (ref != null) {
      RepositoryResourceUtil.closeEditor(ref,true);
    }
    MDMServerObject serverObj=((MDMServerObjectItem)item).getMDMServerObject();
    factory.deleteObjectLogical(viewObj);
    CommandManager.getInstance().pushCommand(ICommand.CMD_DELETE,viewObj.getId(),serverObj.getName());
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void removeServerObject(IRepositoryViewObject viewObj){
  try {
    Item item=viewObj.getProperty().getItem();
    IEditorReference ref=RepositoryResourceUtil.isOpenedInEditor((IRepositoryViewObject)viewObj);
    if (ref != null) {
      RepositoryResourceUtil.closeEditor(ref,true);
    }
    MDMServerObject serverObj=((MDMServerObjectItem)item).getMDMServerObject();
    factory.deleteObjectLogical(viewObj);
    CommandManager.getInstance().pushCommand(ICommand.CMD_DELETE,viewObj.getId(),serverObj.getName());
  }
 catch (  BusinessException e) {
    MessageDialog.openError(getShell(),Messages.Common_Error,e.getMessage());
  }
catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}
Program: 147884
Project: 147884
Buggy source:
private void setAnnotationActions2(Object obj,IMenuManager manager){
  if (obj instanceof XSDElementDeclaration) {
    manager.add(setAnnotationLabelAction);
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLookupFieldsAction);
    manager.add(setAnnotationPrimaryKeyInfoAction);
  }
  if (obj instanceof XSDParticle) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLabelAction);
  }
  if (Util.IsEnterPrise()) {
    manager.add(new Separator());
    manager.add(setAnnotationWriteAction);
    manager.add(setAnnotationNoAction);
    if (obj instanceof XSDParticle) {
      manager.add(visibleRuleAction);
      manager.add(defaultValueRuleAction);
    }
  }
  java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels(isLocalInput());
  for (int i=0; i < availablemodels.size(); i++) {
    IAvailableModel model=availablemodels.get(i);
    model.fillContextMenu(obj,manager,this,dataModelName);
    if (i == 1) {
      manager.add(new Separator());
    }
  }
}

Fixed version (ground truth):
private void setAnnotationActions2(Object obj,IMenuManager manager){
  if (obj instanceof XSDElementDeclaration) {
    manager.add(setAnnotationLabelAction);
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLookupFieldsAction);
    manager.add(setAnnotationPrimaryKeyInfoAction);
  }
  if (obj instanceof XSDParticle) {
    manager.add(setAnnotationDescriptionsAction);
    manager.add(setAnnotationLabelAction);
  }
  if (Util.IsEnterPrise()) {
    manager.add(new Separator());
    manager.add(setAnnotationWriteAction);
    manager.add(setAnnotationNoAction);
    if (obj instanceof XSDParticle) {
      manager.add(visibleRuleAction);
      manager.add(defaultValueRuleAction);
      defaultValueRuleAction.setEnabled(!isAutoGeneratedType((XSDParticle)obj));
    }
  }
  java.util.List<IAvailableModel> availablemodels=AvailableModelUtil.getAvailableModels(isLocalInput());
  for (int i=0; i < availablemodels.size(); i++) {
    IAvailableModel model=availablemodels.get(i);
    model.fillContextMenu(obj,manager,this,dataModelName);
    if (i == 1) {
      manager.add(new Separator());
    }
  }
}
Program: 147886
Project: 147886
Buggy source:
public ISelection getSelection(){
  List<Object> selectedObjects=action.getSelectedObject();
  if (!selectedObjects.isEmpty()) {
    Object object=selectedObjects.get(0);
    if (object instanceof IRepositoryViewObject) {
      IRepositoryViewObject viewObj=(IRepositoryViewObject)object;
      RepositoryNode node=RepositoryResourceUtil.convertToNode(viewObj);
      return new StructuredSelection(node);
    }
  }
  return new StructuredSelection();
}

Fixed version (ground truth):
public ISelection getSelection(){
  List<Object> selectedObjects=action.getSelectedObject();
  if (!selectedObjects.isEmpty()) {
    List<RepositoryNode> selectedNodes=new ArrayList<RepositoryNode>();
    for (    Object object : selectedObjects) {
      if (object instanceof IRepositoryViewObject) {
        IRepositoryViewObject viewObj=(IRepositoryViewObject)object;
        RepositoryNode node=RepositoryResourceUtil.convertToNode(viewObj);
        if (node != null) {
          selectedNodes.add(node);
        }
      }
    }
    return new StructuredSelection(selectedNodes);
  }
  return new StructuredSelection();
}
Program: 147887
Project: 147887
Buggy source:
protected void showDeployStatus(IStatus status){
  String prompt;
  if (status.getSeverity() < IStatus.ERROR) {
    prompt=Messages.bind(Messages.AbstractDeployAction_deployMessage,status.getChildren().length);
  }
 else {
    prompt=Messages.bind(Messages.AbstractDeployAction_deployFailure,status.getChildren().length);
  }
  MultiStatusDialog dialog=new MultiStatusDialog(getShell(),prompt,status);
  dialog.open();
}

Fixed version (ground truth):
protected void showDeployStatus(IStatus status){
  String prompt;
  int count=0;
  if (status.isMultiStatus()) {
    for (    IStatus child : status.getChildren()) {
      if (child.isMultiStatus()) {
        count+=child.getChildren().length;
      }
 else {
        count++;
      }
    }
  }
  if (status.getSeverity() < IStatus.ERROR) {
    prompt=Messages.bind(Messages.AbstractDeployAction_deployMessage,count);
  }
 else {
    prompt=Messages.bind(Messages.AbstractDeployAction_deployFailure,count);
  }
  MultiStatusDialog dialog=new MultiStatusDialog(getShell(),prompt,status);
  dialog.open();
}
Program: 147888
Project: 147888
Buggy source:
public static String formatErrorMessage(String sourceMessage){
  String result=null;
  Pattern pattern=null;
  Matcher matcher=null;
  String saxExceptionPattern="String_Node_Str";
  String nestedExceptionPattern="String_Node_Str";
  pattern=Pattern.compile(saxExceptionPattern);
  matcher=pattern.matcher(sourceMessage);
  result=matcher.replaceFirst("String_Node_Str");
  pattern=Pattern.compile(nestedExceptionPattern);
  matcher=pattern.matcher(result);
  result=matcher.replaceFirst("String_Node_Str");
  return result;
}

Fixed version (ground truth):
public static String formatErrorMessage(String sourceMessage){
  String saxExceptionPattern="String_Node_Str";
  String nestedExceptionPattern="String_Node_Str";
  Pattern pattern=Pattern.compile(saxExceptionPattern);
  Matcher matcher=pattern.matcher(sourceMessage);
  String result=matcher.replaceFirst("String_Node_Str");
  pattern=Pattern.compile(nestedExceptionPattern);
  matcher=pattern.matcher(result);
  result=matcher.replaceFirst("String_Node_Str");
  return result;
}
Program: 147889
Project: 147889
Buggy source:
public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=new LinkedList<AbstractRepositoryAction>();
  Item item=viewObj.getProperty().getItem();
  if (item instanceof MDMItem) {
    if (item instanceof ContainerItem) {
      FolderType type=((FolderItem)item).getType();
switch (type.getValue()) {
case FolderType.SYSTEM_FOLDER:
        actions.add(createFolderAction);
      addAction(actions,pasteAction,viewObj);
    actions.add(importServerObjectAction);
  actions.add(importObjectAction);
break;
case FolderType.STABLE_SYSTEM_FOLDER:
break;
case FolderType.FOLDER:
actions.add(createFolderAction);
actions.add(removeFromRepositoryAction);
addAction(actions,pasteAction,viewObj);
break;
}
}
 else if (item instanceof MDMServerObjectItem) {
actions.add(removeFromRepositoryAction);
actions.add(mdmEditPropertyAction);
actions.add(openVersionAction);
addAction(actions,copyAction,viewObj);
addAction(actions,pasteAction,viewObj);
actions.add(duplicateAction);
}
}
actions.add(refreshAction);
actions.add(exportObjectAction);
for (IRepositoryNodeActionProvider provider : getExtendActionProviders()) {
List<AbstractRepositoryAction> providerActions=provider.getActions(viewObj);
if (providerActions != null) {
actions.addAll(providerActions);
}
}
if (viewObj.getRepositoryObjectType() != null && IServerObjectRepositoryType.TYPE_EVENTMANAGER.equals(viewObj.getRepositoryObjectType())) {
actions.add(emAction);
}
return actions;
}

Fixed version (ground truth):
public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=new LinkedList<AbstractRepositoryAction>();
  Item item=viewObj.getProperty().getItem();
  if (item instanceof MDMItem) {
    if (item instanceof ContainerItem) {
      FolderType type=((FolderItem)item).getType();
switch (type.getValue()) {
case FolderType.SYSTEM_FOLDER:
        actions.add(createFolderAction);
      addAction(actions,pasteAction,viewObj);
    actions.add(importServerObjectAction);
  actions.add(importObjectAction);
break;
case FolderType.STABLE_SYSTEM_FOLDER:
break;
case FolderType.FOLDER:
actions.add(createFolderAction);
actions.add(removeFromRepositoryAction);
addAction(actions,pasteAction,viewObj);
break;
}
}
 else if (item instanceof MDMServerObjectItem) {
actions.add(removeFromRepositoryAction);
actions.add(mdmEditPropertyAction);
actions.add(openVersionAction);
addAction(actions,copyAction,viewObj);
addAction(actions,pasteAction,viewObj);
actions.add(duplicateAction);
}
 else if (item instanceof WorkspaceRootItem) {
actions.add(importObjectAction);
}
}
actions.add(refreshAction);
actions.add(exportObjectAction);
for (IRepositoryNodeActionProvider provider : getExtendActionProviders()) {
List<AbstractRepositoryAction> providerActions=provider.getActions(viewObj);
if (providerActions != null) {
actions.addAll(providerActions);
}
}
if (viewObj.getRepositoryObjectType() != null && IServerObjectRepositoryType.TYPE_EVENTMANAGER.equals(viewObj.getRepositoryObjectType())) {
actions.add(emAction);
}
return actions;
}
Program: 147890
Project: 147890
Buggy source:
@Override public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=super.getActions(viewObj);
  if (RepositoryResourceUtil.hasContainerItem(viewObj,FolderType.SYSTEM_FOLDER_LITERAL,FolderType.FOLDER_LITERAL)) {
    actions.add(addAction);
  }
  if (viewObj.getProperty().getItem() instanceof MDMServerObjectItem) {
    actions.add(renameAction);
    actions.add(deployToAction);
    addAction(actions,deployToLastServerAction,viewObj);
    actions.add(exportDataClusterAction);
  }
  actions.add(deployAllAction);
  actions.add(importDataClusterAction);
  return actions;
}

Fixed version (ground truth):
@Override public List<AbstractRepositoryAction> getActions(IRepositoryViewObject viewObj){
  List<AbstractRepositoryAction> actions=super.getActions(viewObj);
  if (RepositoryResourceUtil.hasContainerItem(viewObj,FolderType.SYSTEM_FOLDER_LITERAL,FolderType.FOLDER_LITERAL)) {
    actions.add(addAction);
  }
  if (viewObj.getProperty().getItem() instanceof MDMServerObjectItem) {
    actions.add(renameAction);
    actions.add(deployToAction);
    addAction(actions,deployToLastServerAction,viewObj);
    actions.add(exportDataClusterAction);
    actions.add(importDataClusterAction);
  }
  actions.add(deployAllAction);
  return actions;
}
Program: 147891
Project: 147891
Buggy source:
public void activateEditor(IWorkbenchPage aPage,IStructuredSelection selection){
  initOpenAction();
  openAction.selectionChanged(selection);
  openAction.run();
}

Fixed version (ground truth):
public void activateEditor(IWorkbenchPage aPage,IStructuredSelection selection){
  initOpenAction();
  openAction.selectionChanged(selection);
  for (  IEditorPart editor : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditors()) {
    if (editor instanceof XObjectEditor2) {
      if (selection.getFirstElement() == ((XObjectEditorInput2)editor.getEditorInput()).getViewObject()) {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(editor);
      }
    }
    if (editor instanceof XSDEditor2) {
      if (selection.getFirstElement() == ((XSDEditorInput2)editor.getEditorInput()).getViewObject()) {
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(editor);
      }
    }
  }
}
Program: 147892
Project: 147892
Buggy source:
public IStructuredSelection findSelection(IEditorInput input){
  if (input instanceof IRepositoryViewEditorInput) {
    IRepositoryViewEditorInput rInput=(IRepositoryViewEditorInput)input;
    return new StructuredSelection(rInput.getViewObject());
  }
  return StructuredSelection.EMPTY;
}

Fixed version (ground truth):
public IStructuredSelection findSelection(IEditorInput input){
  if (input instanceof IRepositoryViewEditorInput) {
    IRepositoryViewEditorInput rInput=(IRepositoryViewEditorInput)input;
    return new StructuredSelection(rInput.getViewObject());
  }
  if (input instanceof ProcessEditorInput) {
    IRepositoryViewObject theViewObj=getViewObjForJob(input);
    return new StructuredSelection(theViewObj);
  }
  return StructuredSelection.EMPTY;
}
Program: 147894
Project: 147894
Buggy source:
public SelectImportedModulesDialog(Shell parentShell,XSDSchema schema,TreeObject treeObj,String title){
  super(parentShell);
  this.shell=parentShell;
  this.treeObject=treeObj;
  this.title=title;
  this.xsdSchema=schema;
  String endpointIpAddress=treeObject.getEndpointIpAddress();
  if (endpointIpAddress != null && endpointIpAddress.length() > 0) {
    LOCAL_MDM_URL=endpointIpAddress + "String_Node_Str";
  }
}

Fixed version (ground truth):
public SelectImportedModulesDialog(Shell parentShell,XSDSchema schema,TreeObject treeObj,String title){
  super(parentShell);
  this.shell=parentShell;
  this.treeObject=treeObj;
  this.title=title;
  this.xsdSchema=schema;
  String endpointIpAddress=treeObject.getEndpointIpAddress();
  if (endpointIpAddress != null && endpointIpAddress.length() > 0) {
    local_mdm_url=endpointIpAddress + "String_Node_Str";
  }
}
Program: 147896
Project: 147896
Buggy source:
public void widgetSelected(SelectionEvent e){
  SelectImportedModulesDialog dlg=new SelectImportedModulesDialog(getSite().getShell(),xsdSchema,xobject,"String_Node_Str");
  dlg.create();
  dlg.setBlockOnOpen(true);
  dlg.open();
  if (dlg.getReturnCode() == Window.OK) {
    doImportSchema(dlg.getImportedXSDList(),dlg.getToDelXSDList());
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  SelectImportedModulesDialog dlg=createSelectImportedModulesDialog();
  dlg.create();
  dlg.setBlockOnOpen(true);
  dlg.open();
  if (dlg.getReturnCode() == Window.OK) {
    doImportSchema(dlg.getImportedXSDList(),dlg.getToDelXSDList());
  }
}
Program: 147897
Project: 147897
Buggy source:
private boolean showLockedObjDialog(Object[] objs){
  List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
  for (  Object obj : objs) {
    TreeObject treeObj=(TreeObject)obj;
    String treeObjName=treeObj.getName();
    ERepositoryObjectType type=RepositoryQueryService.getRepositoryObjectType(treeObj.getType());
    if (type != null && treeObjName != null) {
      String uniqueName=getUniqueName(treeObj,treeObjName);
      IRepositoryViewObject viewObject=RepositoryResourceUtil.findViewObjectByName(type,uniqueName);
      viewObjs.add(viewObject);
    }
  }
  LockedObjectDialog lockDialog=new LockedObjectDialog(getShell(),Messages.ImportServerObjectWizard_lockedObjectMessage,viewObjs);
  if (lockDialog.needShowDialog() && lockDialog.open() == IDialogConstants.CANCEL_ID) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean showLockedObjDialog(Object[] objs){
  List<IRepositoryViewObject> viewObjs=new LinkedList<IRepositoryViewObject>();
  for (  Object obj : objs) {
    TreeObject treeObj=(TreeObject)obj;
    String treeObjName=treeObj.getName();
    ERepositoryObjectType type=RepositoryQueryService.getRepositoryObjectType(treeObj.getType());
    if (type != null && treeObjName != null) {
      String uniqueName=getUniqueName(treeObj,treeObjName);
      IRepositoryViewObject viewObject=RepositoryResourceUtil.findViewObjectByName(type,uniqueName);
      if (viewObject != null)       viewObjs.add(viewObject);
    }
  }
  LockedObjectDialog lockDialog=new LockedObjectDialog(getShell(),Messages.ImportServerObjectWizard_lockedObjectMessage,viewObjs);
  if (lockDialog.needShowDialog() && lockDialog.open() == IDialogConstants.CANCEL_ID) {
    return false;
  }
  return true;
}
Program: 147898
Project: 147898
Buggy source:
protected XpathWidget getNewXpathWidget(Composite parent){
  return new XpathWidget(parent,treeParent,false);
}

Fixed version (ground truth):
protected XpathWidget getNewXpathWidget(Composite parent){
  if (treeParent == null)   treeParent=(TreeParent)((IAdaptable)mainPage).getAdapter(TreeParent.class);
  return new XpathWidget(parent,treeParent,false);
}
Program: 147899
Project: 147899
Buggy source:
public IStatus execute(Object params,IProgressMonitor monitor){
  ERepositoryObjectType type=getViewObjectType();
  String objectName=getLabel();
  IInteractiveHandler handler=InteractiveService.findHandler(type);
  if (handler != null) {
    String typeLabel=handler.getLabel();
    monitor.subTask("String_Node_Str" + typeLabel + "String_Node_Str");
    try {
      if (handler.deploy(this)) {
        if (getCommandType() == CMD_MODIFY)         return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str");
        return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str");
      }
 else       return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName);
    }
 catch (    RemoteException e) {
      return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str"+ e.getMessage(),e);
    }
catch (    XtentisException e) {
      return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str"+ e.getMessage(),e);
    }
  }
 else {
    return DeployStatus.getErrorStatus(this,"String_Node_Str" + objectName + "String_Node_Str");
  }
}

Fixed version (ground truth):
public IStatus execute(Object params,IProgressMonitor monitor){
  ERepositoryObjectType type=getViewObjectType();
  String objectName=getLabel();
  IInteractiveHandler handler=InteractiveService.findHandler(type);
  if (handler != null) {
    String typeLabel=handler.getLabel();
    monitor.subTask(Messages.Deploy_text + typeLabel + "String_Node_Str");
    try {
      if (handler.deploy(this)) {
        if (getCommandType() == CMD_MODIFY)         return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str"+ Messages.Deploy_successfully_text);
        return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str"+ Messages.Create_successfully_text);
      }
 else       return DeployStatus.getErrorStatus(this,Messages.Deploy_fail_text + "String_Node_Str" + typeLabel+ "String_Node_Str"+ objectName);
    }
 catch (    RemoteException e) {
      return DeployStatus.getErrorStatus(this,Messages.Deploy_fail_text + "String_Node_Str" + typeLabel+ "String_Node_Str"+ objectName+ "String_Node_Str"+ Messages.Causeis_text+ "String_Node_Str"+ e.getMessage(),e);
    }
catch (    XtentisException e) {
      return DeployStatus.getErrorStatus(this,Messages.Deploy_fail_text + "String_Node_Str" + typeLabel+ "String_Node_Str"+ objectName+ "String_Node_Str"+ Messages.Causeis_text+ "String_Node_Str"+ e.getMessage(),e);
    }
  }
 else {
    return DeployStatus.getErrorStatus(this,Messages.Deploy_notSupport_text + "String_Node_Str" + objectName+ "String_Node_Str");
  }
}
Program: 147900
Project: 147900
Buggy source:
public IStatus execute(Object params,IProgressMonitor monitor){
  ERepositoryObjectType type=getViewObjectType();
  String objectName=getLabel();
  IInteractiveHandler handler=InteractiveService.findHandler(type);
  if (handler != null) {
    String typeLabel=handler.getLabel();
    monitor.subTask("String_Node_Str" + typeLabel + "String_Node_Str");
    try {
      if (handler.deploy(this)) {
        if (getCommandType() == CMD_MODIFY)         return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str");
        return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str");
      }
 else       return DeployStatus.getInfoStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str");
    }
 catch (    RemoteException e) {
      return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str"+ e.getMessage(),e);
    }
catch (    XtentisException e) {
      return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str"+ e.getMessage(),e);
    }
  }
 else {
    return DeployStatus.getErrorStatus(this,"String_Node_Str" + objectName + "String_Node_Str");
  }
}

Fixed version (ground truth):
public IStatus execute(Object params,IProgressMonitor monitor){
  ERepositoryObjectType type=getViewObjectType();
  String objectName=getLabel();
  IInteractiveHandler handler=InteractiveService.findHandler(type);
  if (handler != null) {
    String typeLabel=handler.getLabel();
    monitor.subTask("String_Node_Str" + typeLabel + "String_Node_Str");
    try {
      if (handler.deploy(this)) {
        if (getCommandType() == CMD_MODIFY)         return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str");
        return DeployStatus.getOKStatus(this,typeLabel + "String_Node_Str" + objectName+ "String_Node_Str"+ "String_Node_Str");
      }
 else       return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName);
    }
 catch (    RemoteException e) {
      return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str"+ e.getMessage(),e);
    }
catch (    XtentisException e) {
      return DeployStatus.getErrorStatus(this,"String_Node_Str" + typeLabel + "String_Node_Str"+ objectName+ "String_Node_Str"+ e.getMessage(),e);
    }
  }
 else {
    return DeployStatus.getErrorStatus(this,"String_Node_Str" + objectName + "String_Node_Str");
  }
}
Program: 147901
Project: 147901
Buggy source:
public void handleEvent(Event event){
  if (event.button == DOMViewDialog.BUTTON_SAVE) {
    try {
      final XtentisPort port=Util.getPort(getXObject());
      WSPutItem putItem=new WSPutItem((WSDataClusterPK)getXObject().getWsKey(),d.getXML(),"String_Node_Str".equals(d.getDataModelName()) ? null : new WSDataModelPK(d.getDataModelName()),false);
      WSPutItemWithReport item=new WSPutItemWithReport(putItem,"String_Node_Str",d.isBeforeVerification());
      if (d.isTriggerProcess()) {
        port.putItemWithReport(item);
      }
 else {
        port.putItem(putItem);
      }
      doSearch();
    }
 catch (    Exception e) {
      MessageDialog.openError(shell,"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
      return;
    }
  }
  d.close();
}

Fixed version (ground truth):
public void handleEvent(Event event){
  if (event.button == DOMViewDialog.BUTTON_SAVE) {
    try {
      final XtentisPort port=Util.getPort(getXObject());
      WSPutItem putItem=new WSPutItem((WSDataClusterPK)getXObject().getWsKey(),d.getXML(),"String_Node_Str".equals(d.getDataModelName()) ? null : new WSDataModelPK(d.getDataModelName()),false);
      WSPutItemWithReport item=new WSPutItemWithReport(putItem,"String_Node_Str",d.isBeforeVerification());
      if (d.isTriggerProcess()) {
        port.putItemWithReport(item);
      }
 else {
        port.putItem(putItem);
      }
      doSearch();
    }
 catch (    Exception e) {
      MessageDialog.openError(shell,"String_Node_Str","String_Node_Str" + Util.formatErrorMessage(e.getLocalizedMessage()));
      return;
    }
  }
  d.close();
}
Program: 147902
Project: 147902
Buggy source:
protected void showDeployStatus(IStatus status){
  String prompt;
  if (status.getSeverity() < IStatus.ERROR)   prompt=Messages.AbstractDeployAction_deployMessage;
 else   prompt=Messages.AbstractDeployAction_deployFailure;
  MultiStatusDialog dialog=new MultiStatusDialog(getShell(),status.getChildren().length + prompt,status);
  dialog.open();
}

Fixed version (ground truth):
protected void showDeployStatus(IStatus status){
  String prompt;
  MultiStatusDialog dialog=null;
  if (status.getSeverity() < IStatus.ERROR) {
    prompt=Messages.AbstractDeployAction_deployMessage;
    dialog=new MultiStatusDialog(getShell(),status.getChildren().length + prompt,status);
  }
 else {
    prompt=Messages.bind(Messages.AbstractDeployAction_deployFailure,status.getChildren().length);
    dialog=new MultiStatusDialog(getShell(),prompt,status);
  }
  dialog.open();
}